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>2019-10-03 03:05:59 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-03 03:05:59 +0300
commit427b23c12718bea233931431e7d9307881a960c0 (patch)
tree5e15672783c950a5e68dd89517d7888e652e01a7 /spec/lib/gitlab_spec.rb
parent6d60f910762c1a92a07a4afaf1b26962f75ee4b6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab_spec.rb')
-rw-r--r--spec/lib/gitlab_spec.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/spec/lib/gitlab_spec.rb b/spec/lib/gitlab_spec.rb
index ccb5cb3aa43..7e318017a05 100644
--- a/spec/lib/gitlab_spec.rb
+++ b/spec/lib/gitlab_spec.rb
@@ -71,26 +71,30 @@ describe Gitlab do
end
describe '.com?' do
+ before do
+ Thread.current[:is_com] = nil
+ end
+
it 'is true when on GitLab.com' do
- stub_config_setting(url: 'https://gitlab.com')
+ allow(LightSettings).to receive(:host).and_return('gitlab.com')
expect(described_class.com?).to eq true
end
it 'is true when on staging' do
- stub_config_setting(url: 'https://staging.gitlab.com')
+ allow(LightSettings).to receive(:host).and_return('staging.gitlab.com')
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')
+ allow(LightSettings).to receive(:host).and_return('example.gitlab.com')
expect(described_class.com?).to eq true
end
it 'is false when not on GitLab.com' do
- stub_config_setting(url: 'http://example.com')
+ allow(LightSettings).to receive(:host).and_return('example.com')
expect(described_class.com?).to eq false
end