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-04-04 15:31:16 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2019-04-04 15:31:16 +0300
commitc60d0efe0d2f2f0bdd1e626c378fe655461c5f22 (patch)
tree2a203b9618da88c89ad759be079949d0293e4d0d /spec
parent2fdc7c1fd6884cf120bf82cb870f66d1bf73811a (diff)
parentec85debaf51067cc78d54188ec1eef94342d5a8b (diff)
Merge branch 'stop-signing-avatar-paths' into 'master'
Speed up avatar URLs with object storage Closes #43065 See merge request gitlab-org/gitlab-ce!26858
Diffstat (limited to 'spec')
-rw-r--r--spec/uploaders/records_uploads_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/uploaders/records_uploads_spec.rb b/spec/uploaders/records_uploads_spec.rb
index 3592a11360d..ab98976ec27 100644
--- a/spec/uploaders/records_uploads_spec.rb
+++ b/spec/uploaders/records_uploads_spec.rb
@@ -94,4 +94,13 @@ describe RecordsUploads do
expect { uploader.remove! }.to change { Upload.count }.from(1).to(0)
end
end
+
+ describe '#filename' do
+ it 'gets the filename from the path recorded in the database, not CarrierWave' do
+ uploader.store!(upload_fixture('rails_sample.jpg'))
+ expect_any_instance_of(GitlabUploader).not_to receive(:filename)
+
+ expect(uploader.filename).to eq('rails_sample.jpg')
+ end
+ end
end