summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-07-27 10:46:59 +0200
committerRémy Coutable <remy@rymai.me>2017-07-27 10:46:59 +0200
commitcbfdc7e3b53c5443a82c78bc69c77ad000648973 (patch)
tree2710ae7e785f4177a349529879de04975761b993
parent704ce761f3686d7fee498b92a67a99cfed558ee7 (diff)
downloadgitlab-ce-rc/35599-stop-the-bleeding-of-default_url_options.tar.gz
Ensure the overriding of Gitlab::Application.routes.default_url_options is only localrc/35599-stop-the-bleeding-of-default_url_options
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r--spec/features/dashboard/issues_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/features/dashboard/issues_spec.rb b/spec/features/dashboard/issues_spec.rb
index 2a5ef08da60..ea7a9efc326 100644
--- a/spec/features/dashboard/issues_spec.rb
+++ b/spec/features/dashboard/issues_spec.rb
@@ -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