summaryrefslogtreecommitdiff
path: root/internal/db/bundb/notification_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/bundb/notification_test.go')
-rw-r--r--internal/db/bundb/notification_test.go46
1 files changed, 26 insertions, 20 deletions
diff --git a/internal/db/bundb/notification_test.go b/internal/db/bundb/notification_test.go
index eb2c02066..8e2fb8031 100644
--- a/internal/db/bundb/notification_test.go
+++ b/internal/db/bundb/notification_test.go
@@ -28,6 +28,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/gtscontext"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/id"
+ "github.com/superseriousbusiness/gotosocial/internal/paging"
"github.com/superseriousbusiness/gotosocial/internal/util"
)
@@ -92,10 +93,11 @@ func (suite *NotificationTestSuite) TestGetAccountNotificationsWithSpam() {
notifications, err := suite.db.GetAccountNotifications(
gtscontext.SetBarebones(context.Background()),
testAccount.ID,
- id.Highest,
- id.Lowest,
- "",
- 20,
+ &paging.Page{
+ Min: paging.EitherMinID("", id.Lowest),
+ Max: paging.MaxID(id.Highest),
+ Limit: 20,
+ },
nil,
nil,
)
@@ -115,10 +117,11 @@ func (suite *NotificationTestSuite) TestGetAccountNotificationsWithoutSpam() {
notifications, err := suite.db.GetAccountNotifications(
gtscontext.SetBarebones(context.Background()),
testAccount.ID,
- id.Highest,
- id.Lowest,
- "",
- 20,
+ &paging.Page{
+ Min: paging.EitherMinID("", id.Lowest),
+ Max: paging.MaxID(id.Highest),
+ Limit: 20,
+ },
nil,
nil,
)
@@ -140,10 +143,11 @@ func (suite *NotificationTestSuite) TestDeleteNotificationsWithSpam() {
notifications, err := suite.db.GetAccountNotifications(
gtscontext.SetBarebones(context.Background()),
testAccount.ID,
- id.Highest,
- id.Lowest,
- "",
- 20,
+ &paging.Page{
+ Min: paging.EitherMinID("", id.Lowest),
+ Max: paging.MaxID(id.Highest),
+ Limit: 20,
+ },
nil,
nil,
)
@@ -161,10 +165,11 @@ func (suite *NotificationTestSuite) TestDeleteNotificationsWithSpam() {
notifications, err = suite.db.GetAccountNotifications(
gtscontext.SetBarebones(context.Background()),
testAccount.ID,
- id.Highest,
- id.Lowest,
- "",
- 20,
+ &paging.Page{
+ Min: paging.EitherMinID("", id.Lowest),
+ Max: paging.MaxID(id.Highest),
+ Limit: 20,
+ },
nil,
nil,
)
@@ -183,10 +188,11 @@ func (suite *NotificationTestSuite) TestDeleteNotificationsWithTwoAccounts() {
notifications, err := suite.db.GetAccountNotifications(
gtscontext.SetBarebones(context.Background()),
testAccount.ID,
- id.Highest,
- id.Lowest,
- "",
- 20,
+ &paging.Page{
+ Min: paging.EitherMinID("", id.Lowest),
+ Max: paging.MaxID(id.Highest),
+ Limit: 20,
+ },
nil,
nil,
)