diff options
author | 2023-11-11 10:15:04 +0000 | |
---|---|---|
committer | 2023-11-11 10:15:04 +0000 | |
commit | deaea100c37698893e97cf9cab159a3d220ac3cd (patch) | |
tree | f48abc96964652d1701d91c88a00174c8f1b0196 /internal/timeline/prune_test.go | |
parent | [feature] Media attachment placeholders (#2331) (diff) | |
download | gotosocial-deaea100c37698893e97cf9cab159a3d220ac3cd.tar.xz |
[bugfix] support endless polls, and misskey's' method of inferring expiry in closed polls (#2349)
Diffstat (limited to 'internal/timeline/prune_test.go')
-rw-r--r-- | internal/timeline/prune_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/timeline/prune_test.go b/internal/timeline/prune_test.go index 46bd652b7..4cd677953 100644 --- a/internal/timeline/prune_test.go +++ b/internal/timeline/prune_test.go @@ -40,7 +40,7 @@ func (suite *PruneTestSuite) TestPrune() { pruned, err := suite.state.Timelines.Home.Prune(ctx, testAccountID, desiredPreparedItemsLength, desiredIndexedItemsLength) suite.NoError(err) - suite.Equal(16, pruned) + suite.Equal(17, pruned) suite.Equal(5, suite.state.Timelines.Home.GetIndexedLength(ctx, testAccountID)) } @@ -56,7 +56,7 @@ func (suite *PruneTestSuite) TestPruneTwice() { pruned, err := suite.state.Timelines.Home.Prune(ctx, testAccountID, desiredPreparedItemsLength, desiredIndexedItemsLength) suite.NoError(err) - suite.Equal(16, pruned) + suite.Equal(17, pruned) suite.Equal(5, suite.state.Timelines.Home.GetIndexedLength(ctx, testAccountID)) // Prune same again, nothing should be pruned this time. @@ -78,7 +78,7 @@ func (suite *PruneTestSuite) TestPruneTo0() { pruned, err := suite.state.Timelines.Home.Prune(ctx, testAccountID, desiredPreparedItemsLength, desiredIndexedItemsLength) suite.NoError(err) - suite.Equal(21, pruned) + suite.Equal(22, pruned) suite.Equal(0, suite.state.Timelines.Home.GetIndexedLength(ctx, testAccountID)) } @@ -95,7 +95,7 @@ func (suite *PruneTestSuite) TestPruneToInfinityAndBeyond() { pruned, err := suite.state.Timelines.Home.Prune(ctx, testAccountID, desiredPreparedItemsLength, desiredIndexedItemsLength) suite.NoError(err) suite.Equal(0, pruned) - suite.Equal(21, suite.state.Timelines.Home.GetIndexedLength(ctx, testAccountID)) + suite.Equal(22, suite.state.Timelines.Home.GetIndexedLength(ctx, testAccountID)) } func TestPruneTestSuite(t *testing.T) { |