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>2021-06-16 21:25:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-16 21:25:58 +0300
commita5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch)
treefb69158581673816a8cd895f9d352dcb3c678b1e /spec/lib/gitlab_spec.rb
parentd16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff)
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
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