Files
groundstation/internal/display/video_test.go
T
piotr b169a64ad5
Build Ground Station / build (push) Successful in 44s
feat: show no-WFB kiosk fallback only while video absent (#2)
2026-10-01 14:40:24 +02:00

27 lines
627 B
Go

package display
import "testing"
func TestVideoPresenceTransitionsReportChange(t *testing.T) {
presence := NewVideoPresence()
if presence.Active() {
t.Fatal("video must be absent before any signal")
}
if !presence.SetActive(true) {
t.Fatal("first video appearance must report a change")
}
if !presence.Active() {
t.Fatal("video must be active after appearance")
}
if presence.SetActive(true) {
t.Fatal("repeated appearance must not report a change")
}
if !presence.SetActive(false) {
t.Fatal("video end must report a change")
}
if presence.Active() {
t.Fatal("video must be inactive after end")
}
}