Start working on #12: Fix inconsistencies in alerting providers
This commit is contained in:
1 parent
abd49bca8e
commit
ae2c4b1ea9
16 files changed
+337
-240
No files matched your search
@@ -0,0 +1,14 @@
|
||||
package alerting
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestSlackAlertProvider_IsValid(t *testing.T) {
|
||||
invalidProvider := SlackAlertProvider{WebhookUrl: ""}
|
||||
if invalidProvider.IsValid() {
|
||||
t.Error("provider shouldn't have been valid")
|
||||
}
|
||||
validProvider := SlackAlertProvider{WebhookUrl: "http://example.com"}
|
||||
if !validProvider.IsValid() {
|
||||
t.Error("provider should've been valid")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user