Browse Source

fix test

pull/1091/head
Phil Lee 3 years ago
parent
commit
22f51ad363
  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 context "when processing a bulk upload with errors" do
describe "#call" 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 it "persist the validation errors" do
allow(BulkUpload::Downloader).to receive(:new).with(bulk_upload:).and_return(mock_downloader) 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 end
end end

Loading…
Cancel
Save