This commit is contained in:
@@ -59,4 +59,18 @@ defmodule DecentralisedBookIndex.Metadata.BookTest do
|
||||
assert alternatives_names = [related_book]
|
||||
end
|
||||
end
|
||||
|
||||
describe "author's books" do
|
||||
test "get the list via author's id" do
|
||||
{:ok, author} = Metadata.create_author("Author", "An description")
|
||||
|
||||
author_roles = [
|
||||
%{order: 1, author_id: author.id, role: ""}
|
||||
]
|
||||
|
||||
{:ok, book} = Metadata.create_book("Book", "1234567890", "An description", author_roles)
|
||||
|
||||
assert {:ok, books} = Metadata.get_author_books(author)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user