merges defaultShouldNotify and ShouldNotify

This commit is contained in:
bergquist
2018-10-02 14:28:48 +02:00
parent 67e5f62514
commit 9289cba625
2 changed files with 11 additions and 13 deletions

View File

@@ -142,7 +142,9 @@ func TestShouldSendAlertNotification(t *testing.T) {
})
evalContext.Rule.State = tc.newState
if defaultShouldNotify(evalContext, tc.sendReminder, tc.frequency, tc.state) != tc.expect {
nb := &NotifierBase{SendReminder: tc.sendReminder, Frequency: tc.frequency}
if nb.ShouldNotify(evalContext.Ctx, evalContext, tc.state) != tc.expect {
t.Errorf("failed test %s.\n expected \n%+v \nto return: %v", tc.name, tc, tc.expect)
}
}