summaryrefslogtreecommitdiff
path: root/spec/uploaders
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-26 18:08:03 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-26 18:08:03 +0000
commitdc003cd08b4cb72fecbb03aa978ea0c53c03aeb4 (patch)
tree5e77ce228c33619201ac6706b9789d4a2eed2a3b /spec/uploaders
parente80e0dd64fbb04f60394cb1bb08e17dbcb22b8ce (diff)
downloadgitlab-ce-dc003cd08b4cb72fecbb03aa978ea0c53c03aeb4.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/uploaders')
-rw-r--r--spec/uploaders/object_storage_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/uploaders/object_storage_spec.rb b/spec/uploaders/object_storage_spec.rb
index 06116bd4737..e844b0ad799 100644
--- a/spec/uploaders/object_storage_spec.rb
+++ b/spec/uploaders/object_storage_spec.rb
@@ -714,6 +714,19 @@ describe ObjectStorage do
end
end
+ context 'when empty remote_id is specified' do
+ let(:uploaded_file) do
+ UploadedFile.new(temp_file.path, remote_id: '')
+ end
+
+ it 'uses local storage' do
+ subject
+
+ expect(uploader).to be_file_storage
+ expect(uploader.object_store).to eq(described_class::Store::LOCAL)
+ end
+ end
+
context 'when valid file is specified' do
let(:uploaded_file) do
UploadedFile.new(temp_file.path, filename: "my_file.txt", remote_id: "test/123123")