diff options
author | Collin Guarino <collin.guarino@gmail.com> | 2016-09-23 17:32:42 -0400 |
---|---|---|
committer | Collin Guarino <collin.guarino@gmail.com> | 2016-09-23 17:32:42 -0400 |
commit | 784fcefa2add45d5f2a6ee894c9d7a9e44c375a7 (patch) | |
tree | 46172d58466f66408c1dfc240c360aed2849ddf0 | |
parent | d465e94c2cdfb2fca0200217710239e28096c435 (diff) |
Fixed schedule_test output
-rw-r--r-- | schedule_test.go | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/schedule_test.go b/schedule_test.go index 0039c6b..f1235af 100644 --- a/schedule_test.go +++ b/schedule_test.go @@ -8,19 +8,40 @@ package hue import ( + "github.com/collinux/GoHue" "testing" ) func TestGetAllSchedules(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.GetAllSchedules() + schedules, err := bridge.GetAllSchedules() + if err != nil { + t.Fatal(err) + } + t.Log(schedules) } func TestGetSchedule(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.GetSchedule("4673980164949558") + schedules, err := bridge.GetAllSchedules() + if err != nil { + t.Fatal(err) + } + schedule, err := bridge.GetSchedule(schedules[0].ID) + if err != nil { + t.Fatal(err) + } + t.Log(schedule) } // func TestCreateSchedule(t *testing.T) { |