mirror of
https://github.com/onyx-and-iris/gobs-cli.git
synced 2025-05-20 08:10:22 +01:00
33 lines
678 B
Go
33 lines
678 B
Go
package main
|
|
|
|
import (
|
|
"bytes"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestSceneItemList(t *testing.T) {
|
|
client, disconnect := getClient(t)
|
|
defer disconnect()
|
|
|
|
var out bytes.Buffer
|
|
context := &context{
|
|
Client: client,
|
|
Out: &out,
|
|
}
|
|
|
|
cmd := &SceneItemListCmd{
|
|
SceneName: "gobs-test",
|
|
}
|
|
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())
|
|
}
|
|
}
|