mirror of
https://github.com/TwiN/gatus.git
synced 2025-01-11 08:28:14 +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")
|
|
}
|
|
}
|