mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-07 16:44:25 +01:00
13 lines
365 B
Go
13 lines
365 B
Go
package core
|
|
|
|
import "testing"
|
|
|
|
func TestNewEventFromResult(t *testing.T) {
|
|
if event := NewEventFromResult(&Result{Success: true}); event.Type != EventHealthy {
|
|
t.Error("expected event.Type to be EventHealthy")
|
|
}
|
|
if event := NewEventFromResult(&Result{Success: false}); event.Type != EventUnhealthy {
|
|
t.Error("expected event.Type to be EventUnhealthy")
|
|
}
|
|
}
|