mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-28 19:03:24 +01:00
15 lines
358 B
Go
15 lines
358 B
Go
package slack
|
|
|
|
import "testing"
|
|
|
|
func TestAlertProvider_IsValid(t *testing.T) {
|
|
invalidProvider := AlertProvider{WebhookUrl: ""}
|
|
if invalidProvider.IsValid() {
|
|
t.Error("provider shouldn't have been valid")
|
|
}
|
|
validProvider := AlertProvider{WebhookUrl: "http://example.com"}
|
|
if !validProvider.IsValid() {
|
|
t.Error("provider should've been valid")
|
|
}
|
|
}
|