diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-08 21:05:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-08 21:05:56 +0300 |
commit | 40597fdec080d55d36e97aab1a0b98dfc35517b9 (patch) | |
tree | 20cb97ab39cd511c22657cc23c5834464001feac /spec/lib/gitlab_spec.rb | |
parent | a712542edb9d52105409462de3e56d2a6d6f6c7a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab_spec.rb')
-rw-r--r-- | spec/lib/gitlab_spec.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/spec/lib/gitlab_spec.rb b/spec/lib/gitlab_spec.rb index bb4f71982a0..c1d171815ba 100644 --- a/spec/lib/gitlab_spec.rb +++ b/spec/lib/gitlab_spec.rb @@ -71,30 +71,26 @@ describe Gitlab do end describe '.com?' do - before do - Thread.current[:is_com] = nil - end - it 'is true when on GitLab.com' do - allow(LightSettings).to receive(:host).and_return('gitlab.com') + stub_config_setting(url: 'https://gitlab.com') expect(described_class.com?).to eq true end it 'is true when on staging' do - allow(LightSettings).to receive(:host).and_return('staging.gitlab.com') + stub_config_setting(url: 'https://staging.gitlab.com') expect(described_class.com?).to eq true end it 'is true when on other gitlab subdomain' do - allow(LightSettings).to receive(:host).and_return('example.gitlab.com') + stub_config_setting(url: 'https://example.gitlab.com') expect(described_class.com?).to eq true end it 'is false when not on GitLab.com' do - allow(LightSettings).to receive(:host).and_return('example.com') + stub_config_setting(url: 'http://example.com') expect(described_class.com?).to eq false end |