alerting: golint fixes for alert notifiers. (#17167)
This commit is contained in:
@@ -178,24 +178,24 @@ func TestShouldSendAlertNotification(t *testing.T) {
|
||||
|
||||
func TestBaseNotifier(t *testing.T) {
|
||||
Convey("default constructor for notifiers", t, func() {
|
||||
bJson := simplejson.New()
|
||||
bJSON := simplejson.New()
|
||||
|
||||
model := &models.AlertNotification{
|
||||
Uid: "1",
|
||||
Name: "name",
|
||||
Type: "email",
|
||||
Settings: bJson,
|
||||
Settings: bJSON,
|
||||
}
|
||||
|
||||
Convey("can parse false value", func() {
|
||||
bJson.Set("uploadImage", false)
|
||||
bJSON.Set("uploadImage", false)
|
||||
|
||||
base := NewNotifierBase(model)
|
||||
So(base.UploadImage, ShouldBeFalse)
|
||||
})
|
||||
|
||||
Convey("can parse true value", func() {
|
||||
bJson.Set("uploadImage", true)
|
||||
bJSON.Set("uploadImage", true)
|
||||
|
||||
base := NewNotifierBase(model)
|
||||
So(base.UploadImage, ShouldBeTrue)
|
||||
|
||||
Reference in New Issue
Block a user