summaryrefslogtreecommitdiff
path: root/internal/api
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api')
-rw-r--r--internal/api/client/followrequest/get_test.go2
-rw-r--r--internal/api/client/search/searchget_test.go17
2 files changed, 18 insertions, 1 deletions
diff --git a/internal/api/client/followrequest/get_test.go b/internal/api/client/followrequest/get_test.go
index 01c9cc300..c9b72a35b 100644
--- a/internal/api/client/followrequest/get_test.go
+++ b/internal/api/client/followrequest/get_test.go
@@ -70,7 +70,7 @@ func (suite *GetTestSuite) TestGet() {
b, err := ioutil.ReadAll(result.Body)
assert.NoError(suite.T(), err)
- suite.Equal(`[{"id":"01FHMQX3GAABWSM0S2VZEC2SWC","username":"some_user","acct":"some_user@example.org","display_name":"some user","locked":true,"bot":false,"created_at":"2020-08-10T12:13:28.000Z","note":"i'm a real son of a gun","url":"http://example.org/@some_user","avatar":"","avatar_static":"","header":"http://localhost:8080/assets/default_header.png","header_static":"http://localhost:8080/assets/default_header.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"emojis":[],"fields":[]}]`, string(b))
+ suite.Equal(`[{"id":"01FHMQX3GAABWSM0S2VZEC2SWC","username":"Some_User","acct":"Some_User@example.org","display_name":"some user","locked":true,"bot":false,"created_at":"2020-08-10T12:13:28.000Z","note":"i'm a real son of a gun","url":"http://example.org/@Some_User","avatar":"","avatar_static":"","header":"http://localhost:8080/assets/default_header.png","header_static":"http://localhost:8080/assets/default_header.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"emojis":[],"fields":[]}]`, string(b))
}
func TestGetTestSuite(t *testing.T) {
diff --git a/internal/api/client/search/searchget_test.go b/internal/api/client/search/searchget_test.go
index bcbe83baf..952b5fd5f 100644
--- a/internal/api/client/search/searchget_test.go
+++ b/internal/api/client/search/searchget_test.go
@@ -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