bug(ProcedureExportService.to_zip): use in_batches on Array
This commit is contained in:
parent
196725346b
commit
a3c5bf58ac
1 changed files with 16 additions and 3 deletions
|
@ -1,10 +1,12 @@
|
|||
require 'csv'
|
||||
|
||||
describe ProcedureExportService do
|
||||
describe 'to_data' do
|
||||
let(:procedure) { create(:procedure, :published, :for_individual, :with_all_champs) }
|
||||
let(:service) { ProcedureExportService.new(procedure, procedure.dossiers) }
|
||||
|
||||
describe 'to_xlsx' do
|
||||
subject do
|
||||
ProcedureExportService.new(procedure, procedure.dossiers)
|
||||
service
|
||||
.to_xlsx
|
||||
.open { |f| SimpleXlsxReader.open(f.path) }
|
||||
end
|
||||
|
@ -406,4 +408,15 @@ describe ProcedureExportService do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'to_zip' do
|
||||
subject do
|
||||
service
|
||||
.to_zip
|
||||
end
|
||||
|
||||
it 'does not raises in_batches' do
|
||||
expect(subject).not_to raise_error(NoMethodError)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue