aboutsummaryrefslogtreecommitdiff
path: root/light_test.go
diff options
context:
space:
mode:
authorCollin Guarino <collin.guarino@gmail.com>2016-02-04 14:38:39 -0500
committerCollin Guarino <collin.guarino@gmail.com>2016-02-04 14:38:39 -0500
commita0a8f16f81b36bd700a3d08780ac6e67a9dfc8a0 (patch)
treed989c38f6f8baf004d763413ae0a46e66ed53ed2 /light_test.go
parentf57f0c6b98ce758756e6c5f2c4aaf8946f5e5cb5 (diff)
Added index to Light struct to easily reference it from []light.
Diffstat (limited to 'light_test.go')
-rw-r--r--light_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/light_test.go b/light_test.go
index b1ea862..6da677d 100644
--- a/light_test.go
+++ b/light_test.go
@@ -16,9 +16,10 @@ func TestGetLight(t *testing.T) {
}
func TestSetLightState(t *testing.T) {
+ fmt.Println("\nTESTING LIGHT STATE:\n\n")
bridge := NewBridge("192.168.1.128", "319b36233bd2328f3e40731b23479207")
lights, _ := GetAllLights(bridge)
- fmt.Println(lights[0].Name)
- newState := LightState{On: true}
- SetLightState(bridge, lights[0].UniqueID, newState)
+ fmt.Println("\nUNIQUE ID: ", lights[0].UniqueID)
+ newState := LightState{On: false}
+ SetLightState(bridge, lights[1].Index, newState)
}