diff options
author | lambda <pleromagit@rogerbraun.net> | 2018-07-18 08:52:11 +0000 |
---|---|---|
committer | lambda <pleromagit@rogerbraun.net> | 2018-07-18 08:52:11 +0000 |
commit | b7001ea9e72947596b60e080768be10b4cbae82b (patch) | |
tree | eda8c988ce1a6a81f9d8275a07caed33aac78e1e /test | |
parent | d93789dfde3c44c76a56732088a897ddddfe9716 (diff) | |
parent | 18cac1e36bd91e1554de1f495a7f178b27b2fbc3 (diff) | |
download | pleroma-b7001ea9e72947596b60e080768be10b4cbae82b.tar.gz pleroma-b7001ea9e72947596b60e080768be10b4cbae82b.zip |
Merge branch 'feature/media-description' into 'develop'
Feature/media description
Closes #174
See merge request pleroma/pleroma!255
Diffstat (limited to 'test')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 5 | ||||
-rw-r--r-- | test/web/mastodon_api/status_view_test.exs | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index d1812457d..9e33c1d04 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -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 diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs index d28c3cbad..03c798bef 100644 --- a/test/web/mastodon_api/status_view_test.exs +++ b/test/web/mastodon_api/status_view_test.exs @@ -102,7 +102,8 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do url: "someurl", remote_url: "someurl", preview_url: "someurl", - text_url: "someurl" + text_url: "someurl", + description: nil } assert expected == StatusView.render("attachment.json", %{attachment: object}) |