fix(server,web/m7-353): post-review fixes (test compilation, AlbumRef field, bulk handler, design system)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/coverart"
|
||||
)
|
||||
|
||||
func TestFindSidecarCover(t *testing.T) {
|
||||
@@ -14,7 +16,7 @@ func TestFindSidecarCover(t *testing.T) {
|
||||
}
|
||||
|
||||
// Empty dir first: no cover.
|
||||
if got := findSidecarCover(track); got != "" {
|
||||
if got := coverart.FindSidecar(filepath.Dir(track)); got != "" {
|
||||
t.Errorf("no sidecar → %q, want empty", got)
|
||||
}
|
||||
|
||||
@@ -24,14 +26,14 @@ func TestFindSidecarCover(t *testing.T) {
|
||||
if err := os.WriteFile(folder, []byte("jpg"), 0o644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got := findSidecarCover(track); got != folder {
|
||||
if got := coverart.FindSidecar(filepath.Dir(track)); got != folder {
|
||||
t.Errorf("folder.jpg fallback = %q, want %q", got, folder)
|
||||
}
|
||||
cover := filepath.Join(dir, "cover.jpg")
|
||||
if err := os.WriteFile(cover, []byte("jpg"), 0o644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got := findSidecarCover(track); got != cover {
|
||||
if got := coverart.FindSidecar(filepath.Dir(track)); got != cover {
|
||||
t.Errorf("cover.jpg priority = %q, want %q", got, cover)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user