aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--light_test.go10
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)