add context factory method to tests

update scene_test outputs
This commit is contained in:
2025-06-21 06:43:38 +01:00
parent 7147c3f1ca
commit 69bfaf694d
10 changed files with 30 additions and 109 deletions

View File

@@ -11,10 +11,7 @@ func TestGroupList(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := &context{
Client: client,
Out: &out,
}
context := newContext(client, &out, "")
cmd := &GroupListCmd{
SceneName: "Scene",
@@ -33,10 +30,7 @@ func TestGroupShow(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := &context{
Client: client,
Out: &out,
}
context := newContext(client, &out, "")
cmd := &GroupShowCmd{
SceneName: "Scene",
@@ -56,10 +50,7 @@ func TestGroupToggle(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := &context{
Client: client,
Out: &out,
}
context := newContext(client, &out, "")
cmdStatus := &GroupStatusCmd{
SceneName: "Scene",
@@ -100,10 +91,7 @@ func TestGroupStatus(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := &context{
Client: client,
Out: &out,
}
context := newContext(client, &out, "")
cmdShow := &GroupShowCmd{
SceneName: "Scene",