diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-05-25 20:27:25 +0300 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2017-05-31 07:01:48 +0300 |
commit | 2c6fc0fff6204b20ea3cdd7b8c579692ac2b0ca5 (patch) | |
tree | 8fdecfc1ffd660306aafbd4e424f2385771c2aa3 /spec/uploaders/file_uploader_spec.rb | |
parent | 88d0ccd551f0334304de665ece94ba9810c60de7 (diff) |
Merge branch 'bvl-security-9-2-28917-contain-uploads-in-system-dir' into 'security-9-2'
(security-9-2) Upload files into `public/upload/system` instead of `public/upload`
See merge request !2104
Conflicts:
app/validators/dynamic_path_validator.rb
Fixed conflicts based on 3c7c859c359bf5d3955dd300d6861ff33af21ca7
Diffstat (limited to 'spec/uploaders/file_uploader_spec.rb')
-rw-r--r-- | spec/uploaders/file_uploader_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/uploaders/file_uploader_spec.rb b/spec/uploaders/file_uploader_spec.rb index d9113ef4095..47e9365e13d 100644 --- a/spec/uploaders/file_uploader_spec.rb +++ b/spec/uploaders/file_uploader_spec.rb @@ -15,6 +15,16 @@ describe FileUploader do end end + describe "#store_dir" do + it "stores in the namespace path" do + project = build_stubbed(:empty_project) + uploader = described_class.new(project) + + expect(uploader.store_dir).to include(project.path_with_namespace) + expect(uploader.store_dir).not_to include("system") + end + end + describe 'initialize' do it 'generates a secret if none is provided' do expect(SecureRandom).to receive(:hex).and_return('secret') |