diff options
author | kaniini <nenolod@gmail.com> | 2019-01-26 15:47:52 +0000 |
---|---|---|
committer | kaniini <nenolod@gmail.com> | 2019-01-26 15:47:52 +0000 |
commit | e91f867cc9f372da2262a3ac95a23bc12266595a (patch) | |
tree | 359cefdf58a23900353015b36b0bdb3c33c35a93 /test/web/mastodon_api/mastodon_api_controller_test.exs | |
parent | c00fba4f7dcf10c49bf1fa03be348e7c99a3fc47 (diff) | |
parent | 1f7843b9b8afcb559c8ba59388724dbf4ef3e3c9 (diff) | |
download | pleroma-e91f867cc9f372da2262a3ac95a23bc12266595a.tar.gz pleroma-e91f867cc9f372da2262a3ac95a23bc12266595a.zip |
Merge branch 'features/mastoapi-cards' into 'develop'
MastoAPI: Add Rich-Media support
See merge request pleroma/pleroma!664
Diffstat (limited to 'test/web/mastodon_api/mastodon_api_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 17 |
1 files changed, 17 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..55e778e4f 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -1623,5 +1623,22 @@ 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", + "provider_name" => "www.imdb.com", + "title" => "The Rock", + "type" => "link", + "url" => "http://www.imdb.com/title/tt0117500/" + } + end end end |