mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-22 13:03:05 +08:00
12 lines
444 B
Ruby
Vendored
12 lines
444 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
RSpec.describe Onebox::Engine::TwitchClipsOnebox do
|
|
let(:hostname) { Discourse.current_hostname }
|
|
let(:options) { { hostname: hostname } }
|
|
|
|
it "has the iframe with the correct channel" do
|
|
expect(Onebox.preview("https://clips.twitch.tv/FunVastGalagoKlappa", options).to_s).to match(
|
|
%r{<iframe src="https://clips\.twitch\.tv/embed\?clip=FunVastGalagoKlappa&parent=#{hostname}},
|
|
)
|
|
end
|
|
end
|