diff options
author | marcin mikołajczak <git@mkljczk.pl> | 2024-04-04 14:26:55 +0200 |
---|---|---|
committer | Lain Soykaf <lain@lain.com> | 2024-04-19 10:20:31 +0400 |
commit | 6f6bede9003fc99b24356f06aebfc5dabe54c46c (patch) | |
tree | 1922a120249655ab73e4e39a0a13befb999c5e84 /test | |
parent | 987f44d81142e11b008659f3fbdf9baf69a1e9d8 (diff) | |
download | pleroma-6f6bede9003fc99b24356f06aebfc5dabe54c46c.tar.gz pleroma-6f6bede9003fc99b24356f06aebfc5dabe54c46c.zip |
Include image description in status media cards
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/web/mastodon_api/controllers/status_controller_test.exs | 2 | ||||
-rw-r--r-- | test/pleroma/web/mastodon_api/views/status_view_test.exs | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs index 3d8a0fa99..b8eb2d598 100644 --- a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs +++ b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs @@ -1717,6 +1717,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do card_data = %{ "image" => "http://ia.media-imdb.com/images/rock.jpg", + "image_description" => "", "provider_name" => "example.com", "provider_url" => "https://example.com", "title" => "The Rock", @@ -1770,6 +1771,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do "title" => "Pleroma", "description" => "", "image" => nil, + "image_description" => "", "provider_name" => "example.com", "provider_url" => "https://example.com", "url" => "https://example.com/ogp-missing-data", diff --git a/test/pleroma/web/mastodon_api/views/status_view_test.exs b/test/pleroma/web/mastodon_api/views/status_view_test.exs index f007bb317..163aa19ec 100644 --- a/test/pleroma/web/mastodon_api/views/status_view_test.exs +++ b/test/pleroma/web/mastodon_api/views/status_view_test.exs @@ -773,6 +773,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do page_url = "http://example.com" card = %{ + "image:alt" => "Example image description", url: page_url, site_name: "Example site name", title: "Example website", @@ -780,7 +781,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do description: "Example description" } - %{provider_name: "example.com"} = + %{provider_name: "example.com", image_description: "Example image description"} = StatusView.render("card.json", %{page_url: page_url, rich_media: card}) end |