diff options
author | Mark Felder <feld@feld.me> | 2025-02-28 15:26:13 -0800 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2025-02-28 15:26:13 -0800 |
commit | 2137b681dc9d2643aaee0698fe6e99167691c573 (patch) | |
tree | 796fac254734dba8406be7270637fc4eb88143b8 /test | |
parent | cb073a9cd0ab6e11c2d00ceb200da90c8ce58932 (diff) | |
download | pleroma-2137b681dc9d2643aaee0698fe6e99167691c573.tar.gz pleroma-2137b681dc9d2643aaee0698fe6e99167691c573.zip |
Fix image URLs in TwitterCard parser test
The logic has been changed to ensure we always choose the first image if multiple are specified. This also applies when both OpenGraph and TwitterCard tags are published on a page. We parse for OpenGraph tags first and in this case the website was intentionally serving different images for TwitterCards and OpenGraph.
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/web/rich_media/parsers/twitter_card_test.exs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/pleroma/web/rich_media/parsers/twitter_card_test.exs b/test/pleroma/web/rich_media/parsers/twitter_card_test.exs index 54bf40515..c590f4fcc 100644 --- a/test/pleroma/web/rich_media/parsers/twitter_card_test.exs +++ b/test/pleroma/web/rich_media/parsers/twitter_card_test.exs @@ -44,7 +44,7 @@ defmodule Pleroma.Web.RichMedia.Parsers.TwitterCardTest do "description" => "With little oversight, the N.Y.P.D. has been using powerful surveillance technology on photos of children and teenagers.", "image" => - "https://static01.nyt.com/images/2019/08/01/nyregion/01nypd-juveniles-promo/01nypd-juveniles-promo-videoSixteenByNineJumbo1600.jpg", + "https://static01.nyt.com/images/2019/08/01/nyregion/01nypd-juveniles-promo/01nypd-juveniles-promo-facebookJumbo.jpg", "image:alt" => "", "title" => "She Was Arrested at 14. Then Her Photo Went to a Facial Recognition Database.", @@ -68,7 +68,7 @@ defmodule Pleroma.Web.RichMedia.Parsers.TwitterCardTest do "description" => "With little oversight, the N.Y.P.D. has been using powerful surveillance technology on photos of children and teenagers.", "image" => - "https://static01.nyt.com/images/2019/08/01/nyregion/01nypd-juveniles-promo/01nypd-juveniles-promo-videoSixteenByNineJumbo1600.jpg", + "https://static01.nyt.com/images/2019/08/01/nyregion/01nypd-juveniles-promo/01nypd-juveniles-promo-facebookJumbo.jpg", "image:alt" => "", "site" => nil, "title" => |