Skip to content

Commit

Permalink
is: Add test case for emailNotificationPreferences
Browse files Browse the repository at this point in the history
  • Loading branch information
ryaplots committed Oct 9, 2024
1 parent c896133 commit 7cca109
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/identityserver/storetest/user_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ func (st *StoreTest) TestUserStoreCRUD(t *T) {
ConsolePreferences: &ttnpb.UserConsolePreferences{
ConsoleTheme: ttnpb.ConsoleTheme_CONSOLE_THEME_LIGHT,
},
EmailNotificationPreferences: &ttnpb.EmailNotificationPreferences{
Types: []ttnpb.NotificationType{
ttnpb.NotificationType_API_KEY_CREATED,
},
},
})

if a.So(err, should.BeNil) && a.So(created, should.NotBeNil) {
Expand All @@ -101,6 +106,11 @@ func (st *StoreTest) TestUserStoreCRUD(t *T) {
)
a.So(*ttnpb.StdTime(created.CreatedAt), should.HappenWithin, 5*time.Second, start)
a.So(*ttnpb.StdTime(created.UpdatedAt), should.HappenWithin, 5*time.Second, start)
a.So(created.EmailNotificationPreferences, should.Resemble, &ttnpb.EmailNotificationPreferences{
Types: []ttnpb.NotificationType{
ttnpb.NotificationType_API_KEY_CREATED,
},
})
}
})

Expand Down

0 comments on commit 7cca109

Please sign in to comment.