chore: improve notifications tests (#13863)

This commit is contained in:
Danny Kopping
2024-07-10 15:25:23 +02:00
committed by GitHub
parent c8484b4fc8
commit 542fff7df0
5 changed files with 133 additions and 92 deletions

View File

@ -2493,7 +2493,8 @@ func (s *MethodTestSuite) TestSystemFunctions() {
}))
s.Run("FetchNewMessageMetadata", s.Subtest(func(db database.Store, check *expects) {
// TODO: update this test once we have a specific role for notifications
check.Args(database.FetchNewMessageMetadataParams{}).Asserts(rbac.ResourceSystem, policy.ActionRead)
u := dbgen.User(s.T(), db, database.User{})
check.Args(database.FetchNewMessageMetadataParams{UserID: u.ID}).Asserts(rbac.ResourceSystem, policy.ActionRead)
}))
s.Run("GetNotificationMessagesByStatus", s.Subtest(func(db database.Store, check *expects) {
// TODO: update this test once we have a specific role for notifications