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
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2019-02-19 00:55:13 +0300
committerThong Kuah <tkuah@gitlab.com>2019-02-19 12:04:08 +0300
commit8a1b6041c8af7007c80de87221e20512810be26d (patch)
treeb02ed1a336400b64f26060e30c77162e568a0e68 /spec/models/lfs_download_object_spec.rb
parentfe10964a6884162b9272ec3a32a5736c2a997ab2 (diff)
Use Gitlab::CurrentSettings in UrlValidator
Gitlab::CurrentSettings will create ApplicationSetting.current if not present which means we don't have to use `&.`. We can also more easily use stub_application_setting in specs
Diffstat (limited to 'spec/models/lfs_download_object_spec.rb')
-rw-r--r--spec/models/lfs_download_object_spec.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/spec/models/lfs_download_object_spec.rb b/spec/models/lfs_download_object_spec.rb
index 88838b127d2..9e78d25ad33 100644
--- a/spec/models/lfs_download_object_spec.rb
+++ b/spec/models/lfs_download_object_spec.rb
@@ -46,9 +46,7 @@ describe LfsDownloadObject do
subject { described_class.new(oid: oid, size: size, link: 'http://192.168.1.1') }
before do
- allow(ApplicationSetting)
- .to receive(:current)
- .and_return(ApplicationSetting.build_from_defaults(allow_local_requests_from_hooks_and_services: setting))
+ stub_application_setting(allow_local_requests_from_hooks_and_services: setting)
end
context 'are allowed' do