Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-06 00:09:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-06 00:09:02 +0300
commit76623c12c136f43f24c3966ed4b469e2c0b434b7 (patch)
tree7c5ec884c25e03e4fea131a4d112a9d0ccfd59b8 /spec/support/pages.rb
parentb042382bbf5a4977c5b5c6b0a9a33f4e8ca8d16d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/pages.rb')
-rw-r--r--spec/support/pages.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/support/pages.rb b/spec/support/pages.rb
new file mode 100644
index 00000000000..ad73d5b9ef5
--- /dev/null
+++ b/spec/support/pages.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+RSpec.configure do |config|
+ config.before(:each, :http_pages_enabled) do |_|
+ allow(Gitlab.config.pages).to receive(:external_http).and_return(['1.1.1.1:80'])
+ end
+
+ config.before(:each, :https_pages_enabled) do |_|
+ allow(Gitlab.config.pages).to receive(:external_https).and_return(['1.1.1.1:443'])
+ end
+
+ config.before(:each, :http_pages_disabled) do |_|
+ allow(Gitlab.config.pages).to receive(:external_http).and_return(false)
+ end
+
+ config.before(:each, :https_pages_disabled) do |_|
+ allow(Gitlab.config.pages).to receive(:external_https).and_return(false)
+ end
+end