bug(export.identify): identify pourrait etre la cause des exports remis a 0 [mauvais identification due au type de contenu]
This commit is contained in:
parent
dd3805b7cd
commit
2c3562e829
1 changed files with 29 additions and 0 deletions
29
spec/jobs/export_job_spec.rb
Normal file
29
spec/jobs/export_job_spec.rb
Normal file
|
@ -0,0 +1,29 @@
|
|||
describe ExportJob do
|
||||
let(:procedure) { create(:procedure, instructeurs: [instructeur]) }
|
||||
let(:instructeur) { create(:instructeur) }
|
||||
let(:time_span_type) { :everything }
|
||||
let(:status) { :tous }
|
||||
let(:key) { '123' }
|
||||
let(:export) do
|
||||
create(:export, format:,
|
||||
time_span_type:,
|
||||
key:,
|
||||
instructeur:,
|
||||
groupe_instructeurs: procedure.groupe_instructeurs)
|
||||
end
|
||||
|
||||
subject do
|
||||
ExportJob.perform_now(export)
|
||||
end
|
||||
before do
|
||||
allow_any_instance_of(ArchiveUploader).to receive(:syscall_to_custom_uploader).and_return(true)
|
||||
end
|
||||
|
||||
context 'zip' do
|
||||
let(:format) { :zip }
|
||||
|
||||
it 'does not try to identify file' do
|
||||
expect { subject }.not_to raise_error(ActiveStorage::FileNotFoundError)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue