build spotify-to-navidrome migrator with recovery flow
This commit is contained in:
23
internal/qobuz/client_test.go
Normal file
23
internal/qobuz/client_test.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package qobuz
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestFlexStringUnmarshal(t *testing.T) {
|
||||
var s flexString
|
||||
if err := json.Unmarshal([]byte(`"0724384960650"`), &s); err != nil {
|
||||
t.Fatalf("unmarshal string id failed: %v", err)
|
||||
}
|
||||
if string(s) != "0724384960650" {
|
||||
t.Fatalf("unexpected value %q", string(s))
|
||||
}
|
||||
|
||||
if err := json.Unmarshal([]byte(`12345`), &s); err != nil {
|
||||
t.Fatalf("unmarshal numeric id failed: %v", err)
|
||||
}
|
||||
if string(s) != "12345" {
|
||||
t.Fatalf("unexpected numeric value %q", string(s))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user