diff options
author | Collin Guarino <collin.guarino@gmail.com> | 2016-01-31 12:02:14 -0500 |
---|---|---|
committer | Collin Guarino <collin.guarino@gmail.com> | 2016-01-31 12:02:14 -0500 |
commit | 1e2656275225d15c9ed5f722a8958ea08badf109 (patch) | |
tree | 2b923ef4f397061c4c642ce20204c2de2ac27e04 /light_test.go | |
parent | cd035e828c499dd354e6c4cc1de676af0b47610a (diff) |
Rough implementation of SetLightState with unit tests.
Diffstat (limited to 'light_test.go')
-rw-r--r-- | light_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/light_test.go b/light_test.go index 5639630..2481c0f 100644 --- a/light_test.go +++ b/light_test.go @@ -2,6 +2,7 @@ package hue import ( "testing" + "fmt" ) func TestGetAllLights(t *testing.T) { @@ -13,3 +14,11 @@ func TestGetLight(t *testing.T) { bridge := NewBridge("192.168.1.128", "319b36233bd2328f3e40731b23479207") GetLight(bridge, "Bathroom Light") } + +func TestSetLightState(t *testing.T) { + bridge := NewBridge("192.168.1.128", "319b36233bd2328f3e40731b23479207") + randomLight := GetAllLights(bridge)[0] + fmt.Println(randomLight.Name) + newState := LightState{On: true} + SetLightState(bridge, randomLight.UniqueID, newState) +} |