diff options
author | Rob Watson <rob@mixlr.com> | 2018-01-03 11:07:03 +0300 |
---|---|---|
committer | Rob Watson <rob@mixlr.com> | 2018-03-22 21:58:36 +0300 |
commit | 9d45951fcaeda4f01a2e4be2480d980a3e7cd37e (patch) | |
tree | 536b456729edad79ba718d987a39f235587d4dfb /spec/spec_helper.rb | |
parent | 53d352aaf4ce7f0d2bcaf04cce5252b753ef7938 (diff) |
Add HTTPS-only pages
Closes #28857
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9f6f0204a16..5051cd34564 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -197,6 +197,22 @@ RSpec.configure do |config| Ability.allowed?(*args) end end + + 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 # add simpler way to match asset paths containing digest strings |