summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-02-03 01:56:11 +0100
committerMatija Čupić <matteeyah@gmail.com>2018-02-03 12:20:59 +0100
commit56bcb3e8c87bf25cb33ed02832c146e966cc4d7d (patch)
treebb8aadd524ab052da693ef28e0cfc390024edb70 /spec
parentbf278f791b0f112c79e8cdeaa82db91ae2af4fe4 (diff)
downloadgitlab-ce-56bcb3e8c87bf25cb33ed02832c146e966cc4d7d.tar.gz
Use Gitlab::CurrentSettings instead of current_application_settings
Diffstat (limited to 'spec')
-rw-r--r--spec/features/admin/admin_settings_spec.rb4
-rw-r--r--spec/models/project_auto_devops_spec.rb8
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/features/admin/admin_settings_spec.rb b/spec/features/admin/admin_settings_spec.rb
index 3da2f4e2fdb..39b213988f0 100644
--- a/spec/features/admin/admin_settings_spec.rb
+++ b/spec/features/admin/admin_settings_spec.rb
@@ -52,8 +52,8 @@ feature 'Admin updates settings' do
fill_in 'Auto devops domain', with: 'domain.com'
click_button 'Save'
- expect(current_application_settings.auto_devops_enabled?).to be true
- expect(current_application_settings.auto_devops_domain).to eq('domain.com')
+ expect(Gitlab::CurrentSettings.auto_devops_enabled?).to be true
+ expect(Gitlab::CurrentSettings.auto_devops_domain).to eq('domain.com')
expect(page).to have_content "Application settings saved successfully"
end
diff --git a/spec/models/project_auto_devops_spec.rb b/spec/models/project_auto_devops_spec.rb
index de90080b4b8..296b91a771c 100644
--- a/spec/models/project_auto_devops_spec.rb
+++ b/spec/models/project_auto_devops_spec.rb
@@ -20,7 +20,7 @@ describe ProjectAutoDevops do
context 'when there is an instance domain specified' do
before do
- stub_application_setting(auto_devops_domain: 'example.com')
+ allow(Gitlab::CurrentSettings).to receive(:auto_devops_domain).and_return('example.com')
end
it { expect(auto_devops).to have_domain }
@@ -28,7 +28,7 @@ describe ProjectAutoDevops do
context 'when there is no instance domain specified' do
before do
- stub_application_setting(auto_devops_domain: nil)
+ allow(Gitlab::CurrentSettings).to receive(:auto_devops_domain).and_return(nil)
end
it { expect(auto_devops).not_to have_domain }
@@ -52,7 +52,7 @@ describe ProjectAutoDevops do
context 'when there is an instance domain specified' do
before do
- stub_application_setting(auto_devops_domain: 'example.com')
+ allow(Gitlab::CurrentSettings).to receive(:auto_devops_domain).and_return('example.com')
end
it { expect(auto_devops.variables).to include(domain_variable) }
@@ -60,7 +60,7 @@ describe ProjectAutoDevops do
context 'when there is no instance domain specified' do
before do
- stub_application_setting(auto_devops_domain: nil)
+ allow(Gitlab::CurrentSettings).to receive(:auto_devops_domain).and_return(nil)
end
it { expect(auto_devops.variables).not_to include(domain_variable) }