diff options
| author | Maksim Pechnikov <parallel588@gmail.com> | 2020-02-10 07:59:52 +0300 |
|---|---|---|
| committer | Maksim Pechnikov <parallel588@gmail.com> | 2020-02-10 07:59:52 +0300 |
| commit | b87533760bb386e85eb8c806e1d242d2b1380971 (patch) | |
| tree | 5bdd76fba3da0d90a4c81fff6a930f47b15d4f4c /test/web/rich_media/parsers | |
| parent | ba5e8a644463a19b863e862def80adb6a5a1060b (diff) | |
| parent | 544bdbfb90d764a5aba8ed07c13b842838d76d73 (diff) | |
| download | pleroma-b87533760bb386e85eb8c806e1d242d2b1380971.tar.gz pleroma-b87533760bb386e85eb8c806e1d242d2b1380971.zip | |
Merge branch 'develop' into issue/1276
Diffstat (limited to 'test/web/rich_media/parsers')
| -rw-r--r-- | test/web/rich_media/parsers/twitter_card_test.exs | 15 |
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 |
