mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-24 18:15:19 +00:00
tests: add a rich media card that contains all relevant fields
This commit is contained in:
parent
6eb8c1eb92
commit
26670b09a7
|
@ -274,5 +274,20 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
||||||
%{provider_name: "Example site name"} =
|
%{provider_name: "Example site name"} =
|
||||||
StatusView.render("card.json", %{page_url: page_url, rich_media: card})
|
StatusView.render("card.json", %{page_url: page_url, rich_media: card})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "a rich media card with all relevant data renders correctly" do
|
||||||
|
page_url = "http://example.com"
|
||||||
|
|
||||||
|
card = %{
|
||||||
|
url: page_url,
|
||||||
|
site_name: "Example site name",
|
||||||
|
title: "Example website",
|
||||||
|
image: page_url <> "/example.jpg",
|
||||||
|
description: "Example description"
|
||||||
|
}
|
||||||
|
|
||||||
|
%{provider_name: "Example site name"} =
|
||||||
|
StatusView.render("card.json", %{page_url: page_url, rich_media: card})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue