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/gitlab_uploader_spec.rb')
-rw-r--r--spec/uploaders/gitlab_uploader_spec.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/uploaders/gitlab_uploader_spec.rb b/spec/uploaders/gitlab_uploader_spec.rb
index db70441aaf5..f62ab726631 100644
--- a/spec/uploaders/gitlab_uploader_spec.rb
+++ b/spec/uploaders/gitlab_uploader_spec.rb
@@ -6,7 +6,7 @@ require 'carrierwave/storage/fog'
RSpec.describe GitlabUploader do
let(:uploader_class) { Class.new(described_class) }
- subject { uploader_class.new(double) }
+ subject(:uploader) { uploader_class.new(double) }
describe '#file_storage?' do
context 'when file storage is used' do
@@ -161,6 +161,19 @@ RSpec.describe GitlabUploader do
end
end
+ describe '#multi_read' do
+ let(:file) { fixture_file_upload('spec/fixtures/trace/sample_trace', 'text/plain') }
+ let(:byte_offsets) { [[4, 10], [17, 29]] }
+
+ subject { uploader.multi_read(byte_offsets) }
+
+ before do
+ uploader.store!(file)
+ end
+
+ it { is_expected.to eq(%w[Running gitlab-runner]) }
+ end
+
describe '.version' do
subject { uploader_class.version }