From 06efa1855d9994add579d581f40bbf61fa5976f4 Mon Sep 17 00:00:00 2001 From: deadprogram Date: Thu, 6 Apr 2017 09:55:04 +0200 Subject: [PATCH] digispark: increase test coverage Signed-off-by: deadprogram --- platforms/digispark/digispark_adaptor_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/platforms/digispark/digispark_adaptor_test.go b/platforms/digispark/digispark_adaptor_test.go index e112de94..6ed67bca 100644 --- a/platforms/digispark/digispark_adaptor_test.go +++ b/platforms/digispark/digispark_adaptor_test.go @@ -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)