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:
authorKamil Trzciński <ayufan@ayufan.eu>2019-02-19 17:02:30 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2019-02-19 17:02:30 +0300
commit0aa64cf80ccd7fda10641af0cd43c4c0a7f3e133 (patch)
treec846494996ab50dc0015ac9f965012254115516c /spec
parent44940a9fabd43d8472194d1bd04769642d0312aa (diff)
parent7e55a227a53feaf4c8af9585a395f189402fcbc3 (diff)
Merge branch 'revert-6025b4e8' into 'master'
Revert "Merge branch 'use_gitlab_current_settings' into 'master'" Closes gitlab-ee#9833 See merge request gitlab-org/gitlab-ce!25393
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/current_settings_spec.rb7
-rw-r--r--spec/models/lfs_download_object_spec.rb4
2 files changed, 7 insertions, 4 deletions
diff --git a/spec/lib/gitlab/current_settings_spec.rb b/spec/lib/gitlab/current_settings_spec.rb
index 97910e58676..caf9fc5442c 100644
--- a/spec/lib/gitlab/current_settings_spec.rb
+++ b/spec/lib/gitlab/current_settings_spec.rb
@@ -14,8 +14,9 @@ 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 = ApplicationSetting.first || create(:application_setting)
- db_settings.update!(home_page_url: 'http://mydomain.com', signup_enabled: false)
+ db_settings = create(:application_setting,
+ 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
@@ -108,7 +109,7 @@ describe Gitlab::CurrentSettings do
context 'with pending migrations' do
before do
- allow(ActiveRecord::Migrator).to receive(:needs_migration?).and_return(true)
+ expect(ActiveRecord::Migrator).to receive(:needs_migration?).and_return(true)
end
shared_examples 'a non-persisted ApplicationSetting object' do
diff --git a/spec/models/lfs_download_object_spec.rb b/spec/models/lfs_download_object_spec.rb
index 9e78d25ad33..88838b127d2 100644
--- a/spec/models/lfs_download_object_spec.rb
+++ b/spec/models/lfs_download_object_spec.rb
@@ -46,7 +46,9 @@ describe LfsDownloadObject do
subject { described_class.new(oid: oid, size: size, link: 'http://192.168.1.1') }
before do
- stub_application_setting(allow_local_requests_from_hooks_and_services: setting)
+ allow(ApplicationSetting)
+ .to receive(:current)
+ .and_return(ApplicationSetting.build_from_defaults(allow_local_requests_from_hooks_and_services: setting))
end
context 'are allowed' do