digispark: increase test coverage
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
7443293d2e
commit
06efa1855d
|
@ -2,6 +2,7 @@ package digispark
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"gobot.io/x/gobot"
|
||||
|
@ -70,6 +71,13 @@ func initTestAdaptor() *Adaptor {
|
|||
return a
|
||||
}
|
||||
|
||||
func TestDigisparkAdaptorName(t *testing.T) {
|
||||
a := NewAdaptor()
|
||||
gobottest.Assert(t, strings.HasPrefix(a.Name(), "Digispark"), true)
|
||||
a.SetName("NewName")
|
||||
gobottest.Assert(t, a.Name(), "NewName")
|
||||
}
|
||||
|
||||
func TestAdaptorConnect(t *testing.T) {
|
||||
a := NewAdaptor()
|
||||
gobottest.Assert(t, a.Connect(), ErrConnection)
|
||||
|
|
Loading…
Reference in New Issue