tests: verify media description api support is working
authorWilliam Pitcock <nenolod@dereferenced.org>
Tue, 17 Jul 2018 03:37:26 +0000 (03:37 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Tue, 17 Jul 2018 03:40:47 +0000 (03:40 +0000)
test/web/mastodon_api/mastodon_api_controller_test.exs

index d1812457dd27b9dcc899e8dc7d404c8401d0b0cb..9e33c1d0459a10652c7fd01ad64f4745c88d13ec 100644 (file)
@@ -736,16 +736,19 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest 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