summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-14 03:09:53 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-14 03:09:53 +0000
commit8f30cb223b5e15af8b21ff313e81f70d46c5a42a (patch)
tree6881d3077808ec9900011fb51c3df203591d5c2b /spec/lib/gitlab_spec.rb
parente73d5c696a5465f8ba28bdd5582e766f0fa42e7c (diff)
downloadgitlab-ce-8f30cb223b5e15af8b21ff313e81f70d46c5a42a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab_spec.rb')
-rw-r--r--spec/lib/gitlab_spec.rb19
1 files changed, 10 insertions, 9 deletions
diff --git a/spec/lib/gitlab_spec.rb b/spec/lib/gitlab_spec.rb
index 4df00eaa439..869eaf26772 100644
--- a/spec/lib/gitlab_spec.rb
+++ b/spec/lib/gitlab_spec.rb
@@ -70,20 +70,21 @@ RSpec.describe Gitlab do
end
describe '.com?' do
- it 'is true when on GitLab.com' do
- stub_config_setting(url: 'https://gitlab.com')
+ it "is true when on #{Gitlab::Saas.com_url}" do
+ stub_config_setting(url: Gitlab::Saas.com_url)
expect(described_class.com?).to eq true
end
- it 'is true when on staging' do
- stub_config_setting(url: 'https://staging.gitlab.com')
+ it "is true when on #{Gitlab::Saas.staging_com_url}" do
+ stub_config_setting(url: Gitlab::Saas.staging_com_url)
expect(described_class.com?).to eq true
end
it 'is true when on other gitlab subdomain' do
- stub_config_setting(url: 'https://example.gitlab.com')
+ url_with_subdomain = Gitlab::Saas.com_url.gsub('https://', 'https://example.')
+ stub_config_setting(url: url_with_subdomain)
expect(described_class.com?).to eq true
end
@@ -118,14 +119,14 @@ RSpec.describe Gitlab do
describe '.staging?' do
subject { described_class.staging? }
- it 'is false when on GitLab.com' do
- stub_config_setting(url: 'https://gitlab.com')
+ it "is false when on #{Gitlab::Saas.com_url}" do
+ stub_config_setting(url: Gitlab::Saas.com_url)
expect(subject).to eq false
end
- it 'is true when on staging' do
- stub_config_setting(url: 'https://staging.gitlab.com')
+ it "is true when on #{Gitlab::Saas.staging_com_url}" do
+ stub_config_setting(url: Gitlab::Saas.staging_com_url)
expect(subject).to eq true
end