@@ -723,17 +723,17 @@ func TestDisabledBeforeEnqueue(t *testing.T) {
723
723
user := createSampleUser (t , db )
724
724
725
725
// WHEN: the user has a preference set to not receive the "workspace deleted" notification
726
- templateId := notifications .TemplateWorkspaceDeleted
726
+ templateID := notifications .TemplateWorkspaceDeleted
727
727
n , err := db .UpdateUserNotificationPreferences (ctx , database.UpdateUserNotificationPreferencesParams {
728
728
UserID : user .ID ,
729
- NotificationTemplateIds : []uuid.UUID {templateId },
729
+ NotificationTemplateIds : []uuid.UUID {templateID },
730
730
Disableds : []bool {true },
731
731
})
732
732
require .NoError (t , err , "failed to set preferences" )
733
733
require .EqualValues (t , 1 , n , "unexpected number of affected rows" )
734
734
735
735
// THEN: enqueuing the "workspace deleted" notification should fail with an error
736
- _ , err = enq .Enqueue (ctx , user .ID , templateId , map [string ]string {}, "test" )
736
+ _ , err = enq .Enqueue (ctx , user .ID , templateID , map [string ]string {}, "test" )
737
737
require .ErrorIs (t , err , notifications .ErrCannotEnqueueDisabledNotification , "enqueueing did not fail with expected error" )
738
738
}
739
739
@@ -763,14 +763,14 @@ func TestDisabledAfterEnqueue(t *testing.T) {
763
763
user := createSampleUser (t , db )
764
764
765
765
// GIVEN: a notification is enqueued which has not (yet) been disabled
766
- templateId := notifications .TemplateWorkspaceDeleted
767
- msgId , err := enq .Enqueue (ctx , user .ID , templateId , map [string ]string {}, "test" )
766
+ templateID := notifications .TemplateWorkspaceDeleted
767
+ msgID , err := enq .Enqueue (ctx , user .ID , templateID , map [string ]string {}, "test" )
768
768
require .NoError (t , err )
769
769
770
770
// Disable the notification template.
771
771
n , err := db .UpdateUserNotificationPreferences (ctx , database.UpdateUserNotificationPreferencesParams {
772
772
UserID : user .ID ,
773
- NotificationTemplateIds : []uuid.UUID {templateId },
773
+ NotificationTemplateIds : []uuid.UUID {templateID },
774
774
Disableds : []bool {true },
775
775
})
776
776
require .NoError (t , err , "failed to set preferences" )
@@ -787,7 +787,7 @@ func TestDisabledAfterEnqueue(t *testing.T) {
787
787
})
788
788
assert .NoError (ct , err )
789
789
if assert .Equal (ct , len (m ), 1 ) {
790
- assert .Equal (ct , m [0 ].ID .String (), msgId .String ())
790
+ assert .Equal (ct , m [0 ].ID .String (), msgID .String ())
791
791
assert .Contains (ct , m [0 ].StatusReason .String , "disabled by user" )
792
792
}
793
793
}, testutil .WaitLong , testutil .IntervalFast , "did not find the expected inhibited message" )
0 commit comments