diff options
author | Collin Guarino <collin.guarino@gmail.com> | 2016-02-18 23:30:40 -0500 |
---|---|---|
committer | Collin Guarino <collin.guarino@gmail.com> | 2016-02-18 23:30:40 -0500 |
commit | a95deb0690428f3c793ae7b4e2401ff56de72343 (patch) | |
tree | f16db5adb2f62fa034f962445ccb3179905d2bb7 /scene_test.go | |
parent | 4715205f959490a55b8a2ad8aef56ce503709dbb (diff) |
Implemented Bridge.Login() func that will assign Bridge.Username and create the user if it does not exist. Also convered more functions to Bridge.func()
Diffstat (limited to 'scene_test.go')
-rw-r--r-- | scene_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scene_test.go b/scene_test.go index 07d630c..8a74717 100644 --- a/scene_test.go +++ b/scene_test.go @@ -13,7 +13,8 @@ import ( ) func TestGetAllScenes(t *testing.T) { - bridge, _ := NewBridge("192.168.1.128", "427de8bd6d49f149c8398e4fc08f") + bridge, _ := NewBridge("192.168.1.128") + bridge.Login("427de8bd6d49f149c8398e4fc08f") scenes, _ := bridge.GetAllScenes() for scene := range scenes { fmt.Println("SCENE: ", scenes[scene]) @@ -24,7 +25,8 @@ func TestGetAllScenes(t *testing.T) { } func TestCreateScene(t *testing.T) { - bridge, _ := NewBridge("192.168.1.128", "427de8bd6d49f149c8398e4fc08f") + bridge, _ := NewBridge("192.168.1.128") + bridge.Login("427de8bd6d49f149c8398e4fc08f") scene := Scene{Lights: []string{"1", "2"}} _ = bridge.CreateScene(scene) } |