tests: verify media description api support is working

This commit is contained in:
William Pitcock 2018-07-17 03:37:26 +00:00
parent 99c0252314
commit 489453c246

View file

@ -736,16 +736,19 @@ test "media upload", %{conn: conn} do
filename: "an_image.jpg"
}
desc = "Description of the image"
user = insert(:user)
conn =
conn
|> assign(:user, user)
|> post("/api/v1/media", %{"file" => file})
|> post("/api/v1/media", %{"file" => file, "description" => desc})
assert media = json_response(conn, 200)
assert media["type"] == "image"
assert media["description"] == desc
end
test "hashtag timeline", %{conn: conn} do