summaryrefslogtreecommitdiff
path: root/test/web
diff options
context:
space:
mode:
Diffstat (limited to 'test/web')
-rw-r--r--test/web/rich_media/parsers/twitter_card_test.exs15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/web/rich_media/parsers/twitter_card_test.exs b/test/web/rich_media/parsers/twitter_card_test.exs
index e2610f4c2..751ca614c 100644
--- a/test/web/rich_media/parsers/twitter_card_test.exs
+++ b/test/web/rich_media/parsers/twitter_card_test.exs
@@ -85,4 +85,19 @@ defmodule Pleroma.Web.RichMedia.Parsers.TwitterCardTest do
image: image_path
}}
end
+
+ test "takes first founded title in html head if there is html markup error" do
+ html = File.read!("test/fixtures/nypd-facial-recognition-children-teenagers4.html")
+
+ assert TwitterCard.parse(html, %{}) ==
+ {:ok,
+ %{
+ site: nil,
+ title:
+ "She Was Arrested at 14. Then Her Photo Went to a Facial Recognition Database. - The New York Times",
+ "app:id:googleplay": "com.nytimes.android",
+ "app:name:googleplay": "NYTimes",
+ "app:url:googleplay": "nytimes://reader/id/100000006583622"
+ }}
+ end
end