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:
@@ -13,6 +13,7 @@ import (
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/coverart"
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
|
||||
)
|
||||
|
||||
@@ -62,7 +63,7 @@ func TestFindSidecarCover_PrefersCoverOverFolder(t *testing.T) {
|
||||
if err := os.WriteFile(filepath.Join(dir, "folder.jpg"), []byte("f"), 0o644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
got := findSidecarCover(filepath.Join(dir, "any-track.flac"))
|
||||
got := coverart.FindSidecar(filepath.Dir(filepath.Join(dir, "any-track.flac")))
|
||||
if got != filepath.Join(dir, "cover.jpg") {
|
||||
t.Errorf("got %q, want cover.jpg path", got)
|
||||
}
|
||||
@@ -73,7 +74,7 @@ func TestFindSidecarCover_FallsBackToFolder(t *testing.T) {
|
||||
if err := os.WriteFile(filepath.Join(dir, "folder.png"), []byte("f"), 0o644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
got := findSidecarCover(filepath.Join(dir, "t.flac"))
|
||||
got := coverart.FindSidecar(filepath.Dir(filepath.Join(dir, "t.flac")))
|
||||
if got != filepath.Join(dir, "folder.png") {
|
||||
t.Errorf("got %q, want folder.png path", got)
|
||||
}
|
||||
@@ -81,7 +82,7 @@ func TestFindSidecarCover_FallsBackToFolder(t *testing.T) {
|
||||
|
||||
func TestFindSidecarCover_NoneFound(t *testing.T) {
|
||||
dir := t.TempDir()
|
||||
if got := findSidecarCover(filepath.Join(dir, "t.flac")); got != "" {
|
||||
if got := coverart.FindSidecar(filepath.Dir(filepath.Join(dir, "t.flac"))); got != "" {
|
||||
t.Errorf("got %q, want empty string", got)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user