Update Book and SelectedPublisher component to require Publisher.

This commit is contained in:
2025-05-07 19:04:44 +03:00
parent 61338cd404
commit d82e4c20fc
4 changed files with 24 additions and 6 deletions
@@ -63,8 +63,9 @@ defmodule DecentralisedBookIndex.Metadata.Forms.BookFormTest do
end
describe "create new book via the form" do
test "just name and description", %{user: user} do
test "with all required attributes", %{user: user} do
bids = bids(actor: user)
publisher = generate(publisher())
author_roles = author_roles(actor: user)
valid_params = %{
@@ -75,7 +76,8 @@ defmodule DecentralisedBookIndex.Metadata.Forms.BookFormTest do
"page_count" => 600,
"published" => ~D[2025-03-06],
"author_roles" => author_roles,
"bids" => bids
"bids" => bids,
"publisher_id" => publisher.id
}
form =