mirror of
https://github.com/TwiN/gatus.git
synced 2024-12-14 11:58:04 +00:00
Add test for NewEventFromResult
This commit is contained in:
parent
bfbe928173
commit
06ef7f9efe
1 changed files with 12 additions and 0 deletions
12
core/event_test.go
Normal file
12
core/event_test.go
Normal file
|
@ -0,0 +1,12 @@
|
|||
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")
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue