mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 13:09:33 -06:00
493d437e79
* Remove outdated option
04078317ba
* Use the non-globally exposed RSpec syntax
https://github.com/rspec/rspec-core/pull/2803
* Use the non-globally exposed RSpec syntax, cont
https://github.com/rspec/rspec-core/pull/2803
* Comply to strict predicate matchers
See:
- https://github.com/rspec/rspec-expectations/pull/1195
- https://github.com/rspec/rspec-expectations/pull/1196
- https://github.com/rspec/rspec-expectations/pull/1277
24 lines
691 B
Ruby
24 lines
691 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.describe Onebox::Engine::SlidesOnebox do
|
|
let(:link) { "http://slides.com/drksephy/ecmascript-2015" }
|
|
let(:html) { described_class.new(link).to_html }
|
|
|
|
before do
|
|
stub_request(:get, link).to_return(status: 200, body: onebox_response("slides"))
|
|
end
|
|
|
|
describe "#placeholder_html" do
|
|
it "returns an image as the placeholder" do
|
|
expect(Onebox.preview(link).placeholder_html).to include("//s3.amazonaws.com/media-p.slid.es/thumbnails/secure/cff7c3/decks.jpg")
|
|
end
|
|
end
|
|
|
|
describe "#to_html" do
|
|
it "returns iframe embed" do
|
|
expect(html).to include(URI(link).path)
|
|
expect(html).to include("iframe")
|
|
end
|
|
end
|
|
end
|