Don't use external youtube resources in test

Resolves https://github.com/openSUSE/osem/issues/1986
This commit is contained in:
James Mason 2018-02-25 16:31:55 -08:00
parent 913210347f
commit 137d997793
2 changed files with 8 additions and 3 deletions

View file

@ -63,7 +63,12 @@ RSpec.configure do |config|
Capybara.javascript_driver = :poltergeist
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, phantomjs: Phantomjs.path, js_errors: false, window_size: [1920, 1080])
Capybara::Poltergeist::Driver.new(
app,
phantomjs: Phantomjs.path,
js_errors: false,
window_size: [1920, 1080]
)
end
# Includes helpers and connect them to specific types of tests

View file

@ -11,9 +11,9 @@ end
def mock_commercial_request
response = {
author_name: 'Confreaks',
html: '<iframe width=\'560\' height=\'315\' src=\'https://www.youtube.com/embed/BTTygyxuGj8?feature=oembed\' frameborder=\'0\' allowfullscreen></iframe>',
html: '<iframe width="560" height="315" frameborder="0" allowfullscreen></iframe>',
thumbnail_width: 480,
thumbnail_url: 'https://i.ytimg.com/vi/BTTygyxuGj8/hqdefault.jpg',
thumbnail_url: '/images/rails.png',
provider_name: 'YouTube',
width: 459,
type: 'video',