diff options
author | Collin Guarino <collin.guarino@gmail.com> | 2016-09-23 17:24:07 -0400 |
---|---|---|
committer | Collin Guarino <collin.guarino@gmail.com> | 2016-09-23 17:24:07 -0400 |
commit | d465e94c2cdfb2fca0200217710239e28096c435 (patch) | |
tree | 3c98b56e4d283bc0e749c9da6cbe8cdb02c4bacb | |
parent | 3ad610aac9e7dce1789c6b30bf0e4bbe58682b13 (diff) |
Fixed light_test output
-rw-r--r-- | light_test.go | 19 | ||||
-rw-r--r-- | scene_test.go | 3 |
2 files changed, 16 insertions, 6 deletions
diff --git a/light_test.go b/light_test.go index fb8eb4c..9b4486e 100644 --- a/light_test.go +++ b/light_test.go @@ -8,13 +8,17 @@ package hue import ( + "github.com/collinux/GoHue" "testing" - //"fmt" "time" ) func TestSetLightState(t *testing.T) { - bridge, _ := NewBridge("192.168.1.128") + bridges, err := hue.FindBridges() + if err != nil { + t.Fatal(err) + } + bridge := bridges[0] bridge.Login("427de8bd6d49f149c8398e4fc08f") nameTest, _ := bridge.GetLightByName("Desk Light") // Also tests GetAllLights _ = nameTest @@ -59,7 +63,14 @@ func TestSetLightState(t *testing.T) { } func TestFindNewLights(t *testing.T) { - bridge, _ := NewBridge("192.168.1.128") + bridges, err := hue.FindBridges() + if err != nil { + t.Fatal(err) + } + bridge := bridges[0] bridge.Login("427de8bd6d49f149c8398e4fc08f") - bridge.FindNewLights() + err = bridge.FindNewLights() + if err != nil { + t.Fatal(err) + } } diff --git a/scene_test.go b/scene_test.go index 2717e74..ba0d952 100644 --- a/scene_test.go +++ b/scene_test.go @@ -23,8 +23,7 @@ func TestGetAllScenes(t *testing.T) { if err != nil { t.Fatal(err) } - _ = scenes - // t.Log(scenes) + t.Log(scenes) } // TODO not functional |