|
|
|
|
@ -12,7 +12,6 @@ RSpec.describe BulkUpload::Downloader do
|
|
|
|
|
io |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
# rubocop:disable RSpec/PredicateMatcher |
|
|
|
|
describe "#call" do |
|
|
|
|
let(:mock_storage_service) { instance_double(Storage::S3Service, get_file_io:) } |
|
|
|
|
|
|
|
|
|
@ -23,9 +22,8 @@ RSpec.describe BulkUpload::Downloader do
|
|
|
|
|
|
|
|
|
|
expect(mock_storage_service).to have_received(:get_file_io).with(bulk_upload.identifier) |
|
|
|
|
|
|
|
|
|
expect(File.exist?(downloader.path)).to be_truthy |
|
|
|
|
expect(File).to exist(downloader.path) |
|
|
|
|
expect(File.read(downloader.path)).to eql("hello") |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
# rubocop:enable RSpec/PredicateMatcher |
|
|
|
|
end |
|
|
|
|
|