1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-05-04 22:17:39 +08:00
hybridgroup.gobot/eventer_test.go

23 lines
382 B
Go
Raw Normal View History

2014-11-30 00:19:53 -08:00
package gobot
import (
"testing"
"github.com/hybridgroup/gobot/gobottest"
)
2014-11-30 00:19:53 -08:00
func TestEventer(t *testing.T) {
e := NewEventer()
e.AddEvent("test")
if _, ok := e.Events()["test"]; !ok {
t.Errorf("Could not add event to list of Events")
}
event := e.Event("test")
gobottest.Refute(t, event, nil)
2014-11-30 00:19:53 -08:00
event = e.Event("booyeah")
gobottest.Assert(t, event, (*Event)(nil))
2014-11-30 00:19:53 -08:00
}