aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCollin Guarino <collin.guarino@gmail.com>2016-09-23 17:19:16 -0400
committerCollin Guarino <collin.guarino@gmail.com>2016-09-23 17:19:16 -0400
commit3ad610aac9e7dce1789c6b30bf0e4bbe58682b13 (patch)
treeac41503e172fe0c43ee0540e62fc093523c98b34
parente4d25196b8f0a2fe9ba57c61a30a752608d507d5 (diff)
Fixed bridge_test file output
-rw-r--r--.group_test.go.swpbin12288 -> 0 bytes
-rw-r--r--.scene_test.go.swpbin12288 -> 0 bytes
-rw-r--r--bridge_test.go19
3 files changed, 13 insertions, 6 deletions
diff --git a/.group_test.go.swp b/.group_test.go.swp
deleted file mode 100644
index fc71b1e..0000000
--- a/.group_test.go.swp
+++ /dev/null
Binary files differ
diff --git a/.scene_test.go.swp b/.scene_test.go.swp
deleted file mode 100644
index a23ba31..0000000
--- a/.scene_test.go.swp
+++ /dev/null
Binary files differ
diff --git a/bridge_test.go b/bridge_test.go
index 04aa0d0..a28b0ab 100644
--- a/bridge_test.go
+++ b/bridge_test.go
@@ -8,26 +8,33 @@
package hue
import (
- "fmt"
+ "github.com/collinux/GoHue"
"testing"
)
func TestCreateUser(t *testing.T) {
- bridge, _ := NewBridge("192.168.1.128")
+ bridges, err := hue.FindBridges()
+ if err != nil {
+ t.Fatal(err)
+ }
+ bridge := bridges[0]
username, _ := bridge.CreateUser("test")
bridge.Login(username)
//bridge.DeleteUser(bridge.Username)
}
func TestFindBridges(t *testing.T) {
- bridges, _ := FindBridges()
- fmt.Println(bridges[0].IPAddress)
+ bridges, err := hue.FindBridges()
+ if err != nil {
+ t.Fatal(err)
+ }
+ t.Log(bridges)
}
func TestBridgeLogin(t *testing.T) {
- bridges, err := FindBridges()
+ bridges, err := hue.FindBridges()
if err != nil {
- fmt.Println("Error on TestBridgeLogin")
+ t.Fatal(err)
}
bridges[0].Login("427de8bd6d49f149c8398e4fc08f")