mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-19 11:43:00 -06:00
fix up more tests, fix missing required changes, etc
This commit is contained in:
parent
61f8da707c
commit
64564496f1
10 changed files with 130 additions and 84 deletions
|
|
@ -93,9 +93,9 @@ func (suite *PublicTestSuite) TestPublicTimelineGetNotEmpty() {
|
|||
// some other statuses were filtered out.
|
||||
suite.NoError(errWithCode)
|
||||
suite.Len(resp.Items, 1)
|
||||
suite.Equal(`<http://localhost:8080/api/v1/timelines/public?limit=1&max_id=01F8MHCP5P2NWYQ416SBA0XSEV&local=false>; rel="next", <http://localhost:8080/api/v1/timelines/public?limit=1&min_id=01HE7XJ1CG84TBKH5V9XKBVGF5&local=false>; rel="prev"`, resp.LinkHeader)
|
||||
suite.Equal(`http://localhost:8080/api/v1/timelines/public?limit=1&max_id=01F8MHCP5P2NWYQ416SBA0XSEV&local=false`, resp.NextLink)
|
||||
suite.Equal(`http://localhost:8080/api/v1/timelines/public?limit=1&min_id=01HE7XJ1CG84TBKH5V9XKBVGF5&local=false`, resp.PrevLink)
|
||||
suite.Equal(`<http://localhost:8080/api/v1/timelines/public?limit=1&local=false&max_id=01F8MHCP5P2NWYQ416SBA0XSEV>; rel="next", <http://localhost:8080/api/v1/timelines/public?limit=1&local=false&min_id=01HE7XJ1CG84TBKH5V9XKBVGF5>; rel="prev"`, resp.LinkHeader)
|
||||
suite.Equal(`http://localhost:8080/api/v1/timelines/public?limit=1&local=false&max_id=01F8MHCP5P2NWYQ416SBA0XSEV`, resp.NextLink)
|
||||
suite.Equal(`http://localhost:8080/api/v1/timelines/public?limit=1&local=false&min_id=01HE7XJ1CG84TBKH5V9XKBVGF5`, resp.PrevLink)
|
||||
}
|
||||
|
||||
// A timeline containing a status hidden due to filtering should return other statuses with no error.
|
||||
|
|
@ -153,8 +153,9 @@ func (suite *PublicTestSuite) TestPublicTimelineGetHideFiltered() {
|
|||
if !filteredStatusFound {
|
||||
suite.FailNow("precondition failed: status we would filter isn't present in unfiltered timeline")
|
||||
}
|
||||
// The public timeline has no prepared status cache and doesn't need to be pruned,
|
||||
// as in the home timeline version of this test.
|
||||
|
||||
// Clear the timeline to drop all cached statuses.
|
||||
suite.state.Caches.Timelines.Public.Clear()
|
||||
|
||||
// Create a filter to hide one status on the timeline.
|
||||
if err := suite.db.PutFilter(ctx, filter); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue