mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 07:02:26 -05:00
[chore] Inboxes for iri test (#508)
* tidy up some federation tests * add missing license to following.go * give zork some followers, as a treat * test InboxesForIRI * Go fmt * update timeline tests
This commit is contained in:
parent
f9b351438b
commit
63f84da3e4
11 changed files with 247 additions and 110 deletions
|
|
@ -74,13 +74,12 @@ func (suite *IndexTestSuite) TestIndexBeforeLowID() {
|
|||
err := suite.timeline.IndexBefore(context.Background(), "00000000000000000000000000", 10)
|
||||
suite.NoError(err)
|
||||
|
||||
// the oldest indexed post should be the lowest one we have in our testrig
|
||||
postID, err := suite.timeline.OldestIndexedItemID(context.Background())
|
||||
suite.NoError(err)
|
||||
suite.Equal("01F8MHAYFKS4KMXF8K5Y1C0KRN", postID)
|
||||
suite.Equal("01F8MHBBN8120SYH7D5S050MGK", postID)
|
||||
|
||||
indexLength := suite.timeline.ItemIndexLength(context.Background())
|
||||
suite.Equal(10, indexLength)
|
||||
suite.Equal(9, indexLength)
|
||||
}
|
||||
|
||||
func (suite *IndexTestSuite) TestIndexBeforeHighID() {
|
||||
|
|
@ -108,9 +107,9 @@ func (suite *IndexTestSuite) TestIndexBehindHighID() {
|
|||
suite.NoError(err)
|
||||
suite.Equal("01FN3VJGFH10KR7S2PB0GFJZYG", postID)
|
||||
|
||||
// indexLength should be 10 because that's all this user has hometimelineable
|
||||
// indexLength should be 9 because that's all this user has hometimelineable
|
||||
indexLength := suite.timeline.ItemIndexLength(context.Background())
|
||||
suite.Equal(10, indexLength)
|
||||
suite.Equal(9, indexLength)
|
||||
}
|
||||
|
||||
func (suite *IndexTestSuite) TestIndexBehindLowID() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue