Reject file playback in tone-test mode

This commit is contained in:
Brandon McGinty (chatgpt)
2026-08-09 23:14:38 -04:00
committed by Brandon McGinty
parent 1081d894c9
commit 219acad951
2 changed files with 19 additions and 1 deletions
+10
View File
@@ -95,6 +95,16 @@ func TestCleanupConnectionAudioIsIdempotent(t *testing.T) {
b.cleanupConnectionAudio()
}
// Tone test mode intentionally does not create an OpenAL stream. Tree
// controls must therefore keep local mute state without trying to update one.
func TestUpdateUserGainAllowsToneTestWithoutStream(t *testing.T) {
(&Barnard{ToneTest: true}).updateUserGain(&gumble.User{})
}
func TestToneTestRejectsFilePlayback(t *testing.T) {
(&Barnard{ToneTest: true, Connected: true}).CommandPlayFile(nil, "https://example.invalid/audio")
}
func TestUserChangeNotification(t *testing.T) {
current := &gumble.Channel{ID: 1, Name: "Current"}
other := &gumble.Channel{ID: 2, Name: "Other"}