[#210] Refactoring.

This commit is contained in:
Ivan Tashkinov 2018-12-04 19:45:09 +03:00
parent 48e6193bf2
commit 44ab3dbe2c

View File

@ -1260,14 +1260,13 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
object = insert(:note)
description = "Informative description of the image. Initial: #{object.data["name"]}}"
_conn =
conn
|> assign(:user, user)
|> post("/api/media/metadata/create.json", %{
"media_id" => object.id,
"alt_text" => %{"text" => description}
})
|> json_response(:no_content)
conn
|> assign(:user, user)
|> post("/api/media/metadata/create.json", %{
"media_id" => object.id,
"alt_text" => %{"text" => description}
})
|> json_response(:no_content)
object = Repo.get!(Object, object.id)
assert object.data["name"] == description