diff options
author | Collin Guarino <collin.guarino@gmail.com> | 2016-09-23 17:48:20 -0400 |
---|---|---|
committer | Collin Guarino <collin.guarino@gmail.com> | 2016-09-23 17:48:20 -0400 |
commit | 0b48413834389d48e4ce42b1d79157c5ca825ff5 (patch) | |
tree | 56f598665981995bb27284a0a189d59115a75546 | |
parent | cf104acfe29f3560c9a9df6592609552f882f292 (diff) |
Added error checking in light_test
-rw-r--r-- | light_test.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/light_test.go b/light_test.go index 9b4486e..57235e1 100644 --- a/light_test.go +++ b/light_test.go @@ -20,9 +20,15 @@ func TestSetLightState(t *testing.T) { } bridge := bridges[0] bridge.Login("427de8bd6d49f149c8398e4fc08f") - nameTest, _ := bridge.GetLightByName("Desk Light") // Also tests GetAllLights + nameTest, err := bridge.GetLightByName("Desk Light") // Also tests GetAllLights + if err != nil { + t.Fatal(err) + } _ = nameTest - selectedLight, _ := bridge.GetLightByIndex(7) + selectedLight, err := bridge.GetLightByIndex(7) + if err != nil { + t.Fatal(err) + } selectedLight.On() selectedLight.SetBrightness(100) |