Don't use external youtube resources in test
Resolves https://github.com/openSUSE/osem/issues/1986
This commit is contained in:
parent
913210347f
commit
137d997793
2 changed files with 8 additions and 3 deletions
|
|
@ -63,7 +63,12 @@ RSpec.configure do |config|
|
||||||
Capybara.javascript_driver = :poltergeist
|
Capybara.javascript_driver = :poltergeist
|
||||||
|
|
||||||
Capybara.register_driver :poltergeist do |app|
|
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
|
end
|
||||||
|
|
||||||
# Includes helpers and connect them to specific types of tests
|
# Includes helpers and connect them to specific types of tests
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,9 @@ end
|
||||||
def mock_commercial_request
|
def mock_commercial_request
|
||||||
response = {
|
response = {
|
||||||
author_name: 'Confreaks',
|
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_width: 480,
|
||||||
thumbnail_url: 'https://i.ytimg.com/vi/BTTygyxuGj8/hqdefault.jpg',
|
thumbnail_url: '/images/rails.png',
|
||||||
provider_name: 'YouTube',
|
provider_name: 'YouTube',
|
||||||
width: 459,
|
width: 459,
|
||||||
type: 'video',
|
type: 'video',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue