Inventaire import: manage case where author does not exist
This commit is contained in:
@@ -132,6 +132,27 @@ func TestCallInventaireEdition(t *testing.T) {
|
||||
result)
|
||||
}
|
||||
|
||||
func TestCalInventaireEditionNoAuthor(t *testing.T) {
|
||||
|
||||
result, err := CallInventaireEdition(getBaseInventaireUrl(), "isbn:9782226487162", "fr")
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
assert.Equal(t,
|
||||
InventaireEditionDetailedSingleResult{
|
||||
Id: "isbn:9782226487162",
|
||||
Title: "Les Yeux de Mona",
|
||||
Author: nil,
|
||||
Description: "",
|
||||
ISBN: "978-2-226-48716-2",
|
||||
Publisher: "éditions Albin Michel",
|
||||
ReleaseDate: "2024-02-01",
|
||||
Image: "https://inventaire.io/img/entities/3ca857913983d694be03dee712bb2af9e2c51747",
|
||||
Lang: "fr",
|
||||
},
|
||||
result)
|
||||
}
|
||||
|
||||
func TestCallInventaireEditionFromISBN(t *testing.T) {
|
||||
result, err := CallInventaireFromISBN(getBaseInventaireUrl(), "9782070379248", "fr")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user