keyboard: increase test coverage
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
39bf7540df
commit
628a087a0f
|
@ -2,6 +2,7 @@ package keyboard
|
|||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"gobot.io/x/gobot"
|
||||
|
@ -25,6 +26,13 @@ func TestKeyboardDriver(t *testing.T) {
|
|||
gobottest.Assert(t, d.Connection(), (gobot.Connection)(nil))
|
||||
}
|
||||
|
||||
func TestKeyboardDriverName(t *testing.T) {
|
||||
d := initTestKeyboardDriver()
|
||||
gobottest.Assert(t, strings.HasPrefix(d.Name(), "Keyboard"), true)
|
||||
d.SetName("NewName")
|
||||
gobottest.Assert(t, d.Name(), "NewName")
|
||||
}
|
||||
|
||||
func TestKeyboardDriverStart(t *testing.T) {
|
||||
d := initTestKeyboardDriver()
|
||||
gobottest.Assert(t, d.Start(), nil)
|
||||
|
|
Loading…
Reference in New Issue