Add the attribute for a avatar image url for Author.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -24,4 +24,16 @@ defmodule DecentralisedBookIndex.Metadata.AuthorRolesTest do
|
||||
refute author_role.role
|
||||
end
|
||||
end
|
||||
|
||||
describe "author's avatar image" do
|
||||
test "update avatar image" do
|
||||
avatar_url = "/images/avatar.avif"
|
||||
|
||||
{:ok, author} = Metadata.create_author("Author", "An description")
|
||||
|
||||
assert {:ok, author} = Metadata.assign_author_avatar_image(author, avatar_url)
|
||||
|
||||
assert author.avatar_url == avatar_url
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user