diff options
Diffstat (limited to 'internal/federation/federatingdb/announce_test.go')
-rw-r--r-- | internal/federation/federatingdb/announce_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/federation/federatingdb/announce_test.go b/internal/federation/federatingdb/announce_test.go index 6c0d969f4..d9158f383 100644 --- a/internal/federation/federatingdb/announce_test.go +++ b/internal/federation/federatingdb/announce_test.go @@ -25,6 +25,7 @@ import ( "github.com/superseriousbusiness/activity/streams/vocab" "github.com/superseriousbusiness/gotosocial/internal/ap" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" + "github.com/superseriousbusiness/gotosocial/internal/id" ) type AnnounceTestSuite struct { @@ -74,6 +75,13 @@ func (suite *AnnounceTestSuite) TestAnnounceTwice() { suite.True(ok) suite.Equal(announcingAccount.ID, boost.AccountID) + // Insert the boost-of status into the + // DB cache to emulate processor handling + boost.ID, _ = id.NewULIDFromTime(boost.CreatedAt) + suite.state.Caches.GTS.Status().Store(boost, func() error { + return nil + }) + // only the URI will be set on the boosted status because it still needs to be dereferenced suite.NotEmpty(boost.BoostOf.URI) |