mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-15 08:57:29 -06:00
[bugfix] Don't try to get user when serializing local instance account (#1757)
This commit is contained in:
parent
11e843a273
commit
878ed48de3
4 changed files with 139 additions and 29 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue