diff options
author | Collin Guarino <collin.guarino@gmail.com> | 2016-01-31 16:36:18 -0500 |
---|---|---|
committer | Collin Guarino <collin.guarino@gmail.com> | 2016-01-31 16:36:18 -0500 |
commit | 80a4f4ab1a92c687241043ddedab291a67257150 (patch) | |
tree | 02a2fe90e57faebf1ddc1956c61002f14596de58 /light_test.go | |
parent | 1e2656275225d15c9ed5f722a8958ea08badf109 (diff) |
Refactored error system to make sure all functions return an error if it occurs.
Diffstat (limited to 'light_test.go')
-rw-r--r-- | light_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/light_test.go b/light_test.go index 2481c0f..b1ea862 100644 --- a/light_test.go +++ b/light_test.go @@ -17,8 +17,8 @@ func TestGetLight(t *testing.T) { func TestSetLightState(t *testing.T) { bridge := NewBridge("192.168.1.128", "319b36233bd2328f3e40731b23479207") - randomLight := GetAllLights(bridge)[0] - fmt.Println(randomLight.Name) + lights, _ := GetAllLights(bridge) + fmt.Println(lights[0].Name) newState := LightState{On: true} - SetLightState(bridge, randomLight.UniqueID, newState) + SetLightState(bridge, lights[0].UniqueID, newState) } |