diff options
Diffstat (limited to 'internal/federation/dereferencing/account_test.go')
-rw-r--r-- | internal/federation/dereferencing/account_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/federation/dereferencing/account_test.go b/internal/federation/dereferencing/account_test.go index 77ebb7cac..4f1a83a96 100644 --- a/internal/federation/dereferencing/account_test.go +++ b/internal/federation/dereferencing/account_test.go @@ -101,6 +101,24 @@ func (suite *AccountTestSuite) TestDereferenceLocalAccountAsRemoteURL() { suite.Empty(fetchedAccount.Domain) } +func (suite *AccountTestSuite) TestDereferenceLocalAccountAsRemoteURLNoSharedInboxYet() { + fetchingAccount := suite.testAccounts["local_account_1"] + targetAccount := suite.testAccounts["local_account_2"] + + targetAccount.SharedInboxURI = nil + if _, err := suite.db.UpdateAccount(context.Background(), targetAccount); err != nil { + suite.FailNow(err.Error()) + } + + fetchedAccount, err := suite.dereferencer.GetRemoteAccount(context.Background(), dereferencing.GetRemoteAccountParams{ + RequestingUsername: fetchingAccount.Username, + RemoteAccountID: testrig.URLMustParse(targetAccount.URI), + }) + suite.NoError(err) + suite.NotNil(fetchedAccount) + suite.Empty(fetchedAccount.Domain) +} + func (suite *AccountTestSuite) TestDereferenceLocalAccountAsUsername() { fetchingAccount := suite.testAccounts["local_account_1"] targetAccount := suite.testAccounts["local_account_2"] |