summaryrefslogtreecommitdiff
path: root/internal/federation/dereferencing/account_test.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-06-22 20:46:36 +0100
committerLibravatar GitHub <noreply@github.com>2023-06-22 20:46:36 +0100
commit9a22102fa8b1ce47571d5bba71e8f36895d21bf0 (patch)
tree3c2af6db0a3905d31243cd840d1dd50bea59dbb0 /internal/federation/dereferencing/account_test.go
parent[docs] Clarify email requirement for OIDC (#1918) (diff)
downloadgotosocial-9a22102fa8b1ce47571d5bba71e8f36895d21bf0.tar.xz
[bugfix/chore] oauth entropy fix + media cleanup tasks rewrite (#1853)
Diffstat (limited to 'internal/federation/dereferencing/account_test.go')
-rw-r--r--internal/federation/dereferencing/account_test.go17
1 files changed, 7 insertions, 10 deletions
diff --git a/internal/federation/dereferencing/account_test.go b/internal/federation/dereferencing/account_test.go
index 9cff0a171..71028e342 100644
--- a/internal/federation/dereferencing/account_test.go
+++ b/internal/federation/dereferencing/account_test.go
@@ -25,7 +25,7 @@ import (
"github.com/stretchr/testify/suite"
"github.com/superseriousbusiness/gotosocial/internal/ap"
"github.com/superseriousbusiness/gotosocial/internal/config"
- "github.com/superseriousbusiness/gotosocial/internal/federation/dereferencing"
+ "github.com/superseriousbusiness/gotosocial/internal/gtserror"
"github.com/superseriousbusiness/gotosocial/testrig"
)
@@ -174,9 +174,8 @@ func (suite *AccountTestSuite) TestDereferenceLocalAccountWithUnknownUsername()
"thisaccountdoesnotexist",
config.GetHost(),
)
- var errNotRetrievable *dereferencing.ErrNotRetrievable
- suite.ErrorAs(err, &errNotRetrievable)
- suite.EqualError(err, "item could not be retrieved: no entries")
+ suite.True(gtserror.Unretrievable(err))
+ suite.EqualError(err, "no entries")
suite.Nil(fetchedAccount)
}
@@ -189,9 +188,8 @@ func (suite *AccountTestSuite) TestDereferenceLocalAccountWithUnknownUsernameDom
"thisaccountdoesnotexist",
"localhost:8080",
)
- var errNotRetrievable *dereferencing.ErrNotRetrievable
- suite.ErrorAs(err, &errNotRetrievable)
- suite.EqualError(err, "item could not be retrieved: no entries")
+ suite.True(gtserror.Unretrievable(err))
+ suite.EqualError(err, "no entries")
suite.Nil(fetchedAccount)
}
@@ -203,9 +201,8 @@ func (suite *AccountTestSuite) TestDereferenceLocalAccountWithUnknownUserURI() {
fetchingAccount.Username,
testrig.URLMustParse("http://localhost:8080/users/thisaccountdoesnotexist"),
)
- var errNotRetrievable *dereferencing.ErrNotRetrievable
- suite.ErrorAs(err, &errNotRetrievable)
- suite.EqualError(err, "item could not be retrieved: no entries")
+ suite.True(gtserror.Unretrievable(err))
+ suite.EqualError(err, "no entries")
suite.Nil(fetchedAccount)
}