Inventaire API: updated tests

This commit is contained in:
2026-04-28 19:58:29 +02:00
parent ff8604eac1
commit d8d7bc9570
2 changed files with 3 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ func TestPostImportBookHandler_Ok(t *testing.T) {
book := testGetBook(t, strconv.FormatUint(uint64(id), 10), 200) book := testGetBook(t, strconv.FormatUint(uint64(id), 10), 200)
assert.Equal(t, "les Hauts de Hurle-Vent", book.Title) assert.Equal(t, "les Hauts de Hurle-Vent", book.Title)
assert.Equal(t, "Emily Brontë", book.Author) assert.Equal(t, "Emily Brontë", book.Author)
assert.Equal(t, "isbn:9782253004752", book.InventaireId) assert.Equal(t, "inv:31cee958a93ba50697a3fec2a360f437", book.InventaireId)
assert.Equal(t, "/static/bookcover/44abbcbdc1092212c2bae66f5165019dac1e2a7b.webp", book.CoverPath) assert.Equal(t, "/static/bookcover/44abbcbdc1092212c2bae66f5165019dac1e2a7b.webp", book.CoverPath)
} }
@@ -31,7 +31,7 @@ func TestPostImportBookHandler_OkAuthorKey(t *testing.T) {
book := testGetBook(t, strconv.FormatUint(uint64(id), 10), 200) book := testGetBook(t, strconv.FormatUint(uint64(id), 10), 200)
assert.Equal(t, "Dr Bloodmoney", book.Title) assert.Equal(t, "Dr Bloodmoney", book.Title)
assert.Equal(t, "Philip K. Dick", book.Author) assert.Equal(t, "Philip K. Dick", book.Author)
assert.Equal(t, "isbn:9782290033630", book.InventaireId) assert.Equal(t, "inv:ba7d376567114bd69a6c8f0a135a89d0", book.InventaireId)
assert.Equal(t, "/static/bookcover/1d1493159d031224a42b37c4417fcbb8c76b00bd.webp", book.CoverPath) assert.Equal(t, "/static/bookcover/1d1493159d031224a42b37c4417fcbb8c76b00bd.webp", book.CoverPath)
} }

View File

@@ -97,7 +97,7 @@ func TestSearchBook_ISBNInventaire(t *testing.T) {
Title: "Les premières enquêtes de Maigret", Title: "Les premières enquêtes de Maigret",
Author: "Georges Simenon", Author: "Georges Simenon",
Description: "roman de Georges Simenon", Description: "roman de Georges Simenon",
InventaireID: "isbn:9782253158400", InventaireID: "inv:cd8af0fc32d2f721d2853d02682dfd44",
IsInventaireEdition: true, IsInventaireEdition: true,
Rating: 0, Rating: 0,
Read: false, Read: false,