test: complete test coverage for Eventer
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
c54763046b
commit
acb7046f7a
|
@ -3,6 +3,8 @@ package gobot
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gobot.io/x/gobot/gobottest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestEventerAddEvent(t *testing.T) {
|
func TestEventerAddEvent(t *testing.T) {
|
||||||
|
@ -12,6 +14,7 @@ func TestEventerAddEvent(t *testing.T) {
|
||||||
if _, ok := e.Events()["test"]; !ok {
|
if _, ok := e.Events()["test"]; !ok {
|
||||||
t.Errorf("Could not add event to list of Event names")
|
t.Errorf("Could not add event to list of Event names")
|
||||||
}
|
}
|
||||||
|
gobottest.Assert(t, e.Event("test"), "test")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestEventerDeleteEvent(t *testing.T) {
|
func TestEventerDeleteEvent(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue