-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9582 from demarches-simplifiees/US/fix-export-job
correctif(tech.export): il arrive que des exports soient mal identifié (le content-type), ce qui par la suite renvoie des exports vide (0kb)
- Loading branch information
Showing
3 changed files
with
32 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |