DEV: Add spec for x.com onebox url matcher (#27214)

This commit is contained in:
Jan Cernik 2024-05-28 09:04:20 -03:00 committed by GitHub
parent b6cc95a0e1
commit 30e963be03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 368 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@ -164,6 +164,25 @@ RSpec.describe Onebox::Engine::TwitterStatusOnebox do
end
end
describe "when the domain is x.com" do
before do
@link = "https://x.com/MKBHD/status/1625192182859632661"
@onebox_fixture = "xstatus_noclient"
end
include_context "with engines"
let(:tweet_content) { "I've never played Minecraft" }
let(:full_name) { "Marques Brownlee" }
let(:screen_name) { "MKBHD" }
let(:avatar) { "" }
let(:timestamp) { "" }
let(:favorite_count) { "" }
let(:retweets_count) { "" }
it_behaves_like "an engine"
it_behaves_like "#to_html"
end
context "with twitter client" do
before do
@twitter_client =