aboutsummaryrefslogtreecommitdiff
path: root/light_test.go
diff options
context:
space:
mode:
authorCollin Guarino <collin.guarino@gmail.com>2016-02-12 17:44:52 -0500
committerCollin Guarino <collin.guarino@gmail.com>2016-02-12 17:44:52 -0500
commit9a494fc233ff3fc74b1a30a672a10e49b44de549 (patch)
tree06e84be5d279a51d4a13cc3e3c78f79a21b453b1 /light_test.go
parenta92342f99028ab7dee550b4f77874e5fd4202123 (diff)
Added Light.Blink and made SetLightState get the new light state after a change.
Diffstat (limited to 'light_test.go')
-rw-r--r--light_test.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/light_test.go b/light_test.go
index 98c2030..0ecfeaa 100644
--- a/light_test.go
+++ b/light_test.go
@@ -10,7 +10,7 @@ package hue
import (
"testing"
"fmt"
- "time"
+ //"time"
)
func TestGetAllLights(t *testing.T) {
@@ -27,7 +27,7 @@ func TestSetLightState(t *testing.T) {
fmt.Println("\nTESTING LIGHT STATE:\n\n")
bridge := NewBridge("192.168.1.128", "319b36233bd2328f3e40731b23479207")
lights, _ := GetAllLights(bridge)
- selectedLight := lights[0]
+ selectedLight := lights[5]
selectedLight.On()
time.Sleep(time.Second)
@@ -35,7 +35,10 @@ func TestSetLightState(t *testing.T) {
time.Sleep(time.Second)
selectedLight.Toggle()
time.Sleep(time.Second)
+
selectedLight.ColorLoop(false)
- selectedLight.SetName("Ceiling Fan Outer")
+ selectedLight.SetName(selectedLight.Name)
+
+ selectedLight.Blink(3)
}