diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-12 18:09:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-12 18:09:56 +0300 |
commit | 22a3da26ad21d67acaef7b2598429c8a003f1037 (patch) | |
tree | 64f4434970b2be1187171ca5b50d0db2aff8535c /spec/uploaders | |
parent | 77ba8f96b5da12090a50c31be7f8503aad21cb33 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/uploaders')
-rw-r--r-- | spec/uploaders/gitlab_uploader_spec.rb | 15 |
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 } |