diff --git a/spec/services/procedure_export_service_spec.rb b/spec/services/procedure_export_service_spec.rb index 1021691b6..d85185d2a 100644 --- a/spec/services/procedure_export_service_spec.rb +++ b/spec/services/procedure_export_service_spec.rb @@ -1,10 +1,12 @@ require 'csv' describe ProcedureExportService do - describe 'to_data' do - let(:procedure) { create(:procedure, :published, :for_individual, :with_all_champs) } + 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