test(scanner): pin the demoted-genre contract the genre fix intended
TestAudiobookTagFallbacks still asserted the verbatim "Audiobook" genre
column, but 885d6140 demoted format words to tags-only — and that
commit's message explicitly says the pinned expectation was updated to
the demoted contract. The code change landed; the test edit it
describes never did, so the full suite has been red since 13:21 today
on a test my changes never touched.
Pin the new contract: the genre column stays empty for demoted format
words and the raw candidate ("Audiobook") lands in the tags array —
exactly the tags-only behavior the fix's message documents. Full
integration suite green after this.
This commit is contained in:
1 parent
59eddc1386
commit
b462c7fb44
1 file changed
+7
-1
@@ -25,6 +25,7 @@ import (
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@@ -411,7 +412,12 @@ func TestAudiobookTagFallbacks(t *testing.T) {
|
||||
require.Len(t, item.Narrators, 1, "composer tag fills narrators (Audible convention)")
|
||||
require.Equal(t, "Tag Narrator", item.Narrators[0])
|
||||
require.Equal(t, "Tag Series", item.Series.String, "grouping tag fills series")
|
||||
require.Equal(t, "Audiobook", item.Genre.String, "genre tag fills genre")
|
||||
// 885d6140 demoted format words ("Audiobook") to tags-only: the
|
||||
// genre column stays empty and the raw candidate lands in tags.
|
||||
// (The commit message declares this test's update; the edit itself
|
||||
// never landed — pinned to the demoted contract now.)
|
||||
require.Empty(t, item.Genre.String, "demoted format words never win the genre column")
|
||||
assert.Contains(t, item.Tags, "Audiobook", "the demoted candidate lands as a tag")
|
||||
require.False(t, item.DatePublished.Time.IsZero(), "date tag fills publish date")
|
||||
require.Equal(t, 2020, item.DatePublished.Time.Year())
|
||||
// ASIN/abridged/subtitle arrive only through Audible freeform atoms,
|
||||
|
||||
Reference in new issue
Block a user