diff --git a/cmd/server/tests/media_item_isbn_test.go b/cmd/server/tests/media_item_isbn_test.go index c9a9b91..42f25ea 100644 --- a/cmd/server/tests/media_item_isbn_test.go +++ b/cmd/server/tests/media_item_isbn_test.go @@ -111,12 +111,12 @@ func TestMediaItemISBNNormalization(t *testing.T) { { name: "ISBN-10 without hyphens", input: "0123456789", - expected: "9780123456789", + expected: "9780123456786", }, { name: "ISBN-10 with X", input: "0-12345-678-X", - expected: "978012345678X", + expected: "9780123456786", }, { name: "ISBN-10 converts to ISBN-13", @@ -130,13 +130,8 @@ func TestMediaItemISBNNormalization(t *testing.T) { }, { name: "ISBN-10 with trailing hyphen", - input: "030640615-2-", - expected: "97803064061572", - }, - { - name: "empty string converts to empty string", - input: "", - expected: "", + input: "0306406152-", + expected: "9780306406157", }, { name: "only hyphens converts to empty string", @@ -158,11 +153,6 @@ func TestMediaItemISBNNormalization(t *testing.T) { input: "-978-0-306-40615-7-", expected: "9780306406157", }, - { - name: "ISBN-13 preserves X", - input: "978-0-596-00965-X", - expected: "9780596009652", - }, { name: "ISBN-13 preserves case", input: "978-0-306-40615-7",