From 3ad610aac9e7dce1789c6b30bf0e4bbe58682b13 Mon Sep 17 00:00:00 2001 From: Collin Guarino Date: Fri, 23 Sep 2016 17:19:16 -0400 Subject: Fixed bridge_test file output --- .group_test.go.swp | Bin 12288 -> 0 bytes .scene_test.go.swp | Bin 12288 -> 0 bytes bridge_test.go | 19 +++++++++++++------ 3 files changed, 13 insertions(+), 6 deletions(-) delete mode 100644 .group_test.go.swp delete mode 100644 .scene_test.go.swp diff --git a/.group_test.go.swp b/.group_test.go.swp deleted file mode 100644 index fc71b1e..0000000 Binary files a/.group_test.go.swp and /dev/null differ diff --git a/.scene_test.go.swp b/.scene_test.go.swp deleted file mode 100644 index a23ba31..0000000 Binary files a/.scene_test.go.swp and /dev/null 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") -- cgit v1.2.3