Browse Source

fix test

remotes/origin/bulk-upload-errors-integration
Phil Lee 3 years ago
parent
commit
df7c7c5955
  1. 4
      spec/services/bulk_upload/processor_spec.rb

4
spec/services/bulk_upload/processor_spec.rb

@ -7,12 +7,12 @@ RSpec.describe BulkUpload::Processor do
context "when processing a bulk upload with errors" do
describe "#call" do
let(:mock_downloader) { instance_double(BulkUpload::Downloader, call: nil) }
let(:mock_downloader) { instance_double(BulkUpload::Downloader, call: nil, path: file_fixture("2021_22_lettings_bulk_upload.csv")) }
it "persist the validation errors" do
allow(BulkUpload::Downloader).to receive(:new).with(bulk_upload:).and_return(mock_downloader)
expect { processor.call }.to change(BulkUploadError, :count).by(103)
expect { processor.call }.to change(BulkUploadError, :count).by(9)
end
end
end

Loading…
Cancel
Save