Fix dates in dossiers export
This commit is contained in:
parent
1df948c2b9
commit
ad0a74ea7c
2 changed files with 9 additions and 2 deletions
|
@ -80,6 +80,13 @@ describe ProcedureExportV2Service do
|
|||
it 'should have data' do
|
||||
expect(dossiers_sheet.data.size).to eq(1)
|
||||
expect(etablissements_sheet.data.size).to eq(1)
|
||||
|
||||
# SimpleXlsxReader is transforming datetimes in utc... It is only used in test so we just hack around.
|
||||
offset = dossier.en_construction_at.utc_offset
|
||||
en_construction_at = Time.zone.at(dossiers_sheet.data[0][9] - offset.seconds)
|
||||
en_instruction_at = Time.zone.at(dossiers_sheet.data[0][10] - offset.seconds)
|
||||
expect(en_construction_at).to eq(dossier.en_construction_at.round)
|
||||
expect(en_instruction_at).to eq(dossier.en_instruction_at.round)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue