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
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-08 21:05:56 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-08 21:05:56 +0300
commit40597fdec080d55d36e97aab1a0b98dfc35517b9 (patch)
tree20cb97ab39cd511c22657cc23c5834464001feac /spec
parenta712542edb9d52105409462de3e56d2a6d6f6c7a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/com_spec_helper.rb3
-rw-r--r--spec/fast_spec_helper.rb2
-rw-r--r--spec/lib/gitlab_spec.rb12
3 files changed, 4 insertions, 13 deletions
diff --git a/spec/com_spec_helper.rb b/spec/com_spec_helper.rb
deleted file mode 100644
index f71ccde9509..00000000000
--- a/spec/com_spec_helper.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-# frozen_string_literal: true
-
-Settings.gitlab[:url] = "https://test.gitlab.com"
diff --git a/spec/fast_spec_helper.rb b/spec/fast_spec_helper.rb
index 3fe3f9ff9a9..1a8af335244 100644
--- a/spec/fast_spec_helper.rb
+++ b/spec/fast_spec_helper.rb
@@ -7,12 +7,10 @@ ENV['IN_MEMORY_APPLICATION_SETTINGS'] = 'true'
require 'active_support/dependencies'
require_relative '../config/initializers/0_inject_enterprise_edition_module'
-require_relative '../config/initializers/0_inject_com_module'
require_relative '../config/settings'
require_relative 'support/rspec'
require 'active_support/all'
ActiveSupport::Dependencies.autoload_paths << 'lib'
ActiveSupport::Dependencies.autoload_paths << 'ee/lib'
-ActiveSupport::Dependencies.autoload_paths << 'com/lib'
ActiveSupport::XmlMini.backend = 'Nokogiri'
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