diff options
| author | 2023-05-09 17:05:35 +0200 | |
|---|---|---|
| committer | 2023-05-09 16:05:35 +0100 | |
| commit | 878ed48de34365474498365ab11e3a0feb646be3 (patch) | |
| tree | beafb33aec0292badf3600aa8cdc9bac71df07d7 /internal/api | |
| parent | [bugfix] fix possible domain blockcache nil ptr + add debug String() func (#1... (diff) | |
| download | gotosocial-878ed48de34365474498365ab11e3a0feb646be3.tar.xz | |
[bugfix] Don't try to get user when serializing local instance account (#1757)
Diffstat (limited to 'internal/api')
| -rw-r--r-- | internal/api/client/search/searchget_test.go | 17 | 
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/api/client/search/searchget_test.go b/internal/api/client/search/searchget_test.go index 9adc7a9d2..fe817099f 100644 --- a/internal/api/client/search/searchget_test.go +++ b/internal/api/client/search/searchget_test.go @@ -235,6 +235,23 @@ func (suite *SearchGetTestSuite) TestSearchLocalAccountByURI() {  	suite.NotNil(gotAccount)  } +func (suite *SearchGetTestSuite) TestSearchLocalInstanceAccountByURI() { +	query := "http://localhost:8080/users/localhost:8080" +	resolve := false + +	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) TestSearchLocalAccountByURL() {  	query := "http://localhost:8080/@the_mighty_zork"  	resolve := false  | 
