Files
Bose-SoundTouch/pkg/service/bmx/bmx_test.go
T
Tobias Gesellchen b95bdae751 feat: Add RadioBrowser integration alongside TuneIn support
- Refactors BMX service to support multiple radio providers
- Adds RadioBrowser.com API integration with search and browse
- Splits TuneIn logic into separate module for better organization
- Adds new web UI components for radio station discovery
- Includes new SVG icons for RadioBrowser branding
2026-05-18 22:34:26 +02:00

32 lines
850 B
Go

package bmx
import (
"testing"
)
func TestPlayCustomStream(t *testing.T) {
// Test Standard Base64
dataStd := "eyJzdHJlYW1VcmwiOiJodHRwOi8vZXhhbXBsZS5jb20vc3RyZWFtLm1wMyIsImltYWdlVXJsIjoiaW1hZ2UucG5nIiwibmFtZSI6IlN0cmVhbSBOYW1lIn0="
resp, err := PlayCustomStream(dataStd)
if err != nil {
t.Fatalf("PlayCustomStream with standard base64 failed: %v", err)
}
if resp.Name != "Stream Name" {
t.Errorf("Expected name Stream Name, got %s", resp.Name)
}
// Test URL-safe Base64
dataURL := "eyJzdHJlYW1VcmwiOiJodHRwOi8vZXhhbXBsZS5jb20vc3RyZWFtLm1wMyIsImltYWdlVXJsIjoiaW1hZ2UucG5nIiwibmFtZSI6IlN0cmVhbSBOYW1lIn0="
resp, err = PlayCustomStream(dataURL)
if err != nil {
t.Fatalf("PlayCustomStream with URL-safe base64 failed: %v", err)
}
if resp.Name != "Stream Name" {
t.Errorf("Expected name Stream Name, got %s", resp.Name)
}
}