diff options
Diffstat (limited to 'test/web')
| -rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 16 | 
1 files changed, 16 insertions, 0 deletions
| diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index 6004285d6..bc87383f7 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -1623,5 +1623,21 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do                 |> post("/api/v1/statuses/#{activity_two.id}/pin")                 |> json_response(400)      end + +    test "Status rich-media Card", %{conn: conn, user: user} do +      {:ok, activity} = CommonAPI.post(user, %{"status" => "http://example.com/ogp"}) + +      response = +        conn +        |> get("/api/v1/statuses/#{activity.id}/card") +        |> json_response(200) + +      assert response == %{ +               "image" => "http://ia.media-imdb.com/images/rock.jpg", +               "title" => "The Rock", +               "type" => "link", +               "url" => "http://www.imdb.com/title/tt0117500/" +             } +    end    end  end | 
