require.Equalf(t,1,scenarioCtx.renderCount,"expected render to be called, but wasn't")
require.Equalf(t,1,scenarioCtx.imageUploadCount,"expected image to be uploaded, but wasn't")
require.Truef(t,evalCtx.Ctx.Value("notificationSent").(bool),"expected notification to be sent, but wasn't")
require.Truef(t,evalCtx.Ctx.Value(notificationSent{}).(bool),"expected notification to be sent, but wasn't")
})
notificationServiceScenario(t,"Given alert rule with upload image disabled should not render and upload image, but send notification",evalCtx,false,func(scenarioCtx*scenarioContext){
require.Equalf(t,0,scenarioCtx.renderCount,"expected render not to be called, but it was")
require.Equalf(t,0,scenarioCtx.imageUploadCount,"expected image not to be uploaded, but it was")
require.Truef(t,evalCtx.Ctx.Value("notificationSent").(bool),"expected notification to be sent, but wasn't")
require.Truef(t,evalCtx.Ctx.Value(notificationSent{}).(bool),"expected notification to be sent, but wasn't")
})
notificationServiceScenario(t,"Given alert rule with upload image enabled and render times out should send notification",evalCtx,true,func(scenarioCtx*scenarioContext){
require.Equalf(t,0,scenarioCtx.renderCount,"expected render not to be called, but it was")
require.Equalf(t,0,scenarioCtx.imageUploadCount,"expected image not to be uploaded, but it was")
require.Truef(t,evalCtx.Ctx.Value("notificationSent").(bool),"expected notification to be sent, but wasn't")
require.Truef(t,evalCtx.Ctx.Value(notificationSent{}).(bool),"expected notification to be sent, but wasn't")
})
notificationServiceScenario(t,"Given alert rule with upload image enabled and upload times out should send notification",evalCtx,true,func(scenarioCtx*scenarioContext){