diff options
author | 2023-12-01 15:27:15 +0100 | |
---|---|---|
committer | 2023-12-01 15:27:15 +0100 | |
commit | 0e2c34219112db3a6b7801530a946fd5b1bbb111 (patch) | |
tree | 6a5557373dbfc9edc80de941b13e870a8af32881 /internal/federation/federatingdb/announce_test.go | |
parent | [bugfix] in fedi API CreateStatus(), handle case of data-race and return earl... (diff) | |
download | gotosocial-0e2c34219112db3a6b7801530a946fd5b1bbb111.tar.xz |
[bugfix/chore] `Announce` reliability updates (#2405)v0.13.0-rc1
* [bugfix/chore] `Announce` updates
* test update
* fix tests
* TestParseAnnounce
* update comments
* don't lock/unlock, change function signature
* naming stuff
* don't check domain block twice
* UnwrapIfBoost
* beep boop
Diffstat (limited to 'internal/federation/federatingdb/announce_test.go')
-rw-r--r-- | internal/federation/federatingdb/announce_test.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/internal/federation/federatingdb/announce_test.go b/internal/federation/federatingdb/announce_test.go index ae5213f66..d8de2e49c 100644 --- a/internal/federation/federatingdb/announce_test.go +++ b/internal/federation/federatingdb/announce_test.go @@ -50,8 +50,10 @@ func (suite *AnnounceTestSuite) TestNewAnnounce() { suite.True(ok) suite.Equal(announcingAccount.ID, boost.AccountID) - // only the URI will be set on the boosted status because it still needs to be dereferenced - suite.NotEmpty(boost.BoostOf.URI) + // only the URI will be set for the boosted status + // because it still needs to be dereferenced + suite.Nil(boost.BoostOf) + suite.Equal("http://example.org/users/Some_User/statuses/afaba698-5740-4e32-a702-af61aa543bc1", boost.BoostOfURI) } func (suite *AnnounceTestSuite) TestAnnounceTwice() { @@ -81,8 +83,10 @@ func (suite *AnnounceTestSuite) TestAnnounceTwice() { return nil }) - // only the URI will be set on the boosted status because it still needs to be dereferenced - suite.NotEmpty(boost.BoostOf.URI) + // only the URI will be set for the boosted status + // because it still needs to be dereferenced + suite.Nil(boost.BoostOf) + suite.Equal("http://example.org/users/Some_User/statuses/afaba698-5740-4e32-a702-af61aa543bc1", boost.BoostOfURI) ctx2 := createTestContext(receivingAccount2, announcingAccount) announce2 := suite.testActivities["announce_forwarded_1_turtle"] |