mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-22 08:47:29 -06:00
[bugfix] self-referencing collection pages for status replies (#2364)
This commit is contained in:
parent
efefdb1323
commit
16275853eb
24 changed files with 611 additions and 427 deletions
|
|
@ -163,9 +163,21 @@ func (suite *StatusTestSuite) TestGetStatusTwice() {
|
|||
suite.Less(duration2, duration1)
|
||||
}
|
||||
|
||||
func (suite *StatusTestSuite) TestGetStatusReplies() {
|
||||
targetStatus := suite.testStatuses["local_account_1_status_1"]
|
||||
children, err := suite.db.GetStatusReplies(context.Background(), targetStatus.ID)
|
||||
suite.NoError(err)
|
||||
suite.Len(children, 2)
|
||||
for _, c := range children {
|
||||
suite.Equal(targetStatus.URI, c.InReplyToURI)
|
||||
suite.Equal(targetStatus.AccountID, c.InReplyToAccountID)
|
||||
suite.Equal(targetStatus.ID, c.InReplyToID)
|
||||
}
|
||||
}
|
||||
|
||||
func (suite *StatusTestSuite) TestGetStatusChildren() {
|
||||
targetStatus := suite.testStatuses["local_account_1_status_1"]
|
||||
children, err := suite.db.GetStatusChildren(context.Background(), targetStatus, true, "")
|
||||
children, err := suite.db.GetStatusChildren(context.Background(), targetStatus.ID)
|
||||
suite.NoError(err)
|
||||
suite.Len(children, 2)
|
||||
for _, c := range children {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue