mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-16 21:07:29 -06:00
[bugfix] Don't call strings.ToLower() on usernames when selecting account by domain+username (#1190)
* don't lowercase account username when doing a select * test getting remote user with uppercase username
This commit is contained in:
parent
8d581deb28
commit
3a11861ac6
9 changed files with 47 additions and 32 deletions
|
|
@ -97,6 +97,23 @@ func (suite *SearchGetTestSuite) TestSearchRemoteAccountByNamestring() {
|
|||
suite.NotNil(gotAccount)
|
||||
}
|
||||
|
||||
func (suite *SearchGetTestSuite) TestSearchRemoteAccountByNamestringUppercase() {
|
||||
query := "@Some_User@example.org"
|
||||
resolve := true
|
||||
|
||||
searchResult, err := suite.testSearch(query, resolve, http.StatusOK)
|
||||
if err != nil {
|
||||
suite.FailNow(err.Error())
|
||||
}
|
||||
|
||||
if !suite.Len(searchResult.Accounts, 1) {
|
||||
suite.FailNow("expected 1 account in search results but got 0")
|
||||
}
|
||||
|
||||
gotAccount := searchResult.Accounts[0]
|
||||
suite.NotNil(gotAccount)
|
||||
}
|
||||
|
||||
func (suite *SearchGetTestSuite) TestSearchRemoteAccountByNamestringNoLeadingAt() {
|
||||
query := "brand_new_person@unknown-instance.com"
|
||||
resolve := true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue