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/lib
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-02-19 14:16:25 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2019-02-19 14:16:25 +0300
commit6025b4e8a3845cdf1ac60d7c1e2831b7ce1140bd (patch)
tree732839854ee69ad011bfd413c6a79dad9a755262 /spec/lib
parent1b5e3b2e91ed2d9fea3b92d824faad9f1df90e87 (diff)
parent8a1b6041c8af7007c80de87221e20512810be26d (diff)
Merge branch 'use_gitlab_current_settings' into 'master'
Use Gitlab::CurrentSettings in UrlValidator See merge request gitlab-org/gitlab-ce!25370
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/current_settings_spec.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/lib/gitlab/current_settings_spec.rb b/spec/lib/gitlab/current_settings_spec.rb
index caf9fc5442c..97910e58676 100644
--- a/spec/lib/gitlab/current_settings_spec.rb
+++ b/spec/lib/gitlab/current_settings_spec.rb
@@ -14,9 +14,8 @@ describe Gitlab::CurrentSettings do
describe '#current_application_settings', :use_clean_rails_memory_store_caching do
it 'allows keys to be called directly' do
- db_settings = create(:application_setting,
- home_page_url: 'http://mydomain.com',
- signup_enabled: false)
+ db_settings = ApplicationSetting.first || create(:application_setting)
+ db_settings.update!(home_page_url: 'http://mydomain.com', signup_enabled: false)
expect(described_class.home_page_url).to eq(db_settings.home_page_url)
expect(described_class.signup_enabled?).to be_falsey
@@ -109,7 +108,7 @@ describe Gitlab::CurrentSettings do
context 'with pending migrations' do
before do
- expect(ActiveRecord::Migrator).to receive(:needs_migration?).and_return(true)
+ allow(ActiveRecord::Migrator).to receive(:needs_migration?).and_return(true)
end
shared_examples 'a non-persisted ApplicationSetting object' do