Ensure the overriding of Gitlab::Application.routes.default_url_options is only local

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2017-07-27 10:46:59 +02:00
parent 704ce761f3
commit cbfdc7e3b5
No known key found for this signature in database
GPG key ID: 46DF07E5CD9E96AB

View file

@ -80,6 +80,8 @@ RSpec.describe 'Dashboard Issues', feature: true do
end
it 'shows the new issue page', js: true do
original_defaults = Gitlab::Application.routes.default_url_options
Gitlab::Application.routes.default_url_options = {
host: Capybara.current_session.server.host,
port: Capybara.current_session.server.port,
@ -95,6 +97,8 @@ RSpec.describe 'Dashboard Issues', feature: true do
page.within('#content-body') do
expect(page).to have_selector('.issue-form')
end
Gitlab::Application.routes.default_url_options = original_defaults
end
end
end