test: complete test coverage for Eventer

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram 2017-02-25 13:55:41 +01:00
parent c54763046b
commit acb7046f7a
1 changed files with 3 additions and 0 deletions

View File

@ -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) {