gobs-cli/sceneitem_test.go
onyx-and-iris 101c7552b2 ensure Mic/Aux is created as well as Desktop Audio
add option to read the OBS platform from env var
2025-07-29 06:54:23 +01:00

30 lines
677 B
Go

package main
import (
"bytes"
"strings"
"testing"
)
func TestSceneItemList(t *testing.T) {
client, disconnect := getClient(t)
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, StyleConfig{})
cmd := &SceneItemListCmd{
SceneName: "gobs-test-scene",
}
err := cmd.Run(context)
if err != nil {
t.Fatalf("Failed to list scene items: %v", err)
}
if !strings.Contains(out.String(), "gobs-test-input") {
t.Fatalf("Expected output to contain 'gobs-test-input', got '%s'", out.String())
}
if !strings.Contains(out.String(), "gobs-test-input-2") {
t.Fatalf("Expected output to contain 'gobs-test-input-2', got '%s'", out.String())
}
}