Commit 26670b09 authored by kaniini's avatar kaniini

tests: add a rich media card that contains all relevant fields

parent 6eb8c1eb
Pipeline #7179 passed with stages
in 3 minutes and 43 seconds
......@@ -274,5 +274,20 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
%{provider_name: "Example site name"} =
StatusView.render("card.json", %{page_url: page_url, rich_media: card})
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment