mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 07:03:41 +08: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
17 lines
649 B
Ruby
17 lines
649 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.describe Onebox::Engine::YoukuOnebox do
|
|
before do
|
|
stub_request(:get, 'http://v.youku.com/v_show/id_XNjM3MzAxNzc2.html')
|
|
.to_return(status: 200, body: onebox_response('youku'), headers: { content_type: 'text/html' })
|
|
|
|
stub_request(:get, 'http://v.youku.com/player/getPlayList/VideoIDS/XNjM3MzAxNzc2')
|
|
.to_return(status: 200, body: onebox_response('youku-meta'), headers: { content_type: 'text/html' })
|
|
end
|
|
|
|
it 'returns embed as the placeholder' do
|
|
html = Onebox.preview('http://v.youku.com/v_show/id_XNjM3MzAxNzc2.html').placeholder_html
|
|
expect(html).to match(/embed/)
|
|
end
|
|
end
|