[#210] Refactoring.
This commit is contained in:
parent
48e6193bf2
commit
44ab3dbe2c
|
@ -1260,14 +1260,13 @@ test "it updates `data[name]` of referenced Object with provided value", %{conn:
|
||||||
object = insert(:note)
|
object = insert(:note)
|
||||||
description = "Informative description of the image. Initial: #{object.data["name"]}}"
|
description = "Informative description of the image. Initial: #{object.data["name"]}}"
|
||||||
|
|
||||||
_conn =
|
conn
|
||||||
conn
|
|> assign(:user, user)
|
||||||
|> assign(:user, user)
|
|> post("/api/media/metadata/create.json", %{
|
||||||
|> post("/api/media/metadata/create.json", %{
|
"media_id" => object.id,
|
||||||
"media_id" => object.id,
|
"alt_text" => %{"text" => description}
|
||||||
"alt_text" => %{"text" => description}
|
})
|
||||||
})
|
|> json_response(:no_content)
|
||||||
|> json_response(:no_content)
|
|
||||||
|
|
||||||
object = Repo.get!(Object, object.id)
|
object = Repo.get!(Object, object.id)
|
||||||
assert object.data["name"] == description
|
assert object.data["name"] == description
|
||||||
|
|
Loading…
Reference in a new issue