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:
Diffstat (limited to 'spec/uploaders/object_storage_spec.rb')
-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")