summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-04-25 19:41:46 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-04-25 19:46:05 -0400
commit2c90579749459f0d4d5d534785aa3006bec1a444 (patch)
tree4292ed3e9d16f234d63fd268ea7424621641f935 /config
parentaa9435cddbe57841b4572e05fb4e7756f8b47405 (diff)
downloadgitlab-ce-2c90579749459f0d4d5d534785aa3006bec1a444.tar.gz
Set default_url_options in test environments too
Diffstat (limited to 'config')
-rw-r--r--config/initializers/8_default_url_options.rb20
1 files changed, 9 insertions, 11 deletions
diff --git a/config/initializers/8_default_url_options.rb b/config/initializers/8_default_url_options.rb
index 8c1b56846d2..8fd27b1d88e 100644
--- a/config/initializers/8_default_url_options.rb
+++ b/config/initializers/8_default_url_options.rb
@@ -1,13 +1,11 @@
-unless Rails.env.test?
- default_url_options = {
- host: Gitlab.config.gitlab.host,
- protocol: Gitlab.config.gitlab.protocol,
- script_name: Gitlab.config.gitlab.relative_url_root
- }
+default_url_options = {
+ host: Gitlab.config.gitlab.host,
+ protocol: Gitlab.config.gitlab.protocol,
+ script_name: Gitlab.config.gitlab.relative_url_root
+}
- unless Gitlab.config.gitlab_on_standard_port?
- default_url_options[:port] = Gitlab.config.gitlab.port
- end
-
- Rails.application.routes.default_url_options = default_url_options
+unless Gitlab.config.gitlab_on_standard_port?
+ default_url_options[:port] = Gitlab.config.gitlab.port
end
+
+Rails.application.routes.default_url_options = default_url_options