aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--light_test.go19
-rw-r--r--scene_test.go3
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