Merge pull request #3988 from betagouv/fix-pj-migration-notifications
PJ Migration : ensure creating an empty champ doesn’t display a notification
This commit is contained in:
commit
3d2e6581f3
2 changed files with 6 additions and 4 deletions
|
@ -85,8 +85,10 @@ class PieceJustificativeToChampPieceJointeMigrationService
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
champ.update_columns(
|
champ.update_columns(
|
||||||
updated_at: dossier.updated_at,
|
created_at: dossier.created_at,
|
||||||
created_at: dossier.created_at
|
# Set an updated_at date that won't cause notifications to appear
|
||||||
|
# on gestionnaires' dashboard.
|
||||||
|
updated_at: dossier.created_at
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -113,9 +113,9 @@ describe PieceJustificativeToChampPieceJointeMigrationService do
|
||||||
dossier.reload
|
dossier.reload
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'the champ has the same timestamps as the dossier' do
|
it 'the champ doesn’t trigger a notification' do
|
||||||
expect(dossier.champs.last.created_at).to eq(initial_dossier_timestamps[:created_at])
|
expect(dossier.champs.last.created_at).to eq(initial_dossier_timestamps[:created_at])
|
||||||
expect(dossier.champs.last.updated_at).to eq(initial_dossier_timestamps[:updated_at])
|
expect(dossier.champs.last.updated_at).to eq(initial_dossier_timestamps[:created_at])
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'does not change the dossier timestamps' do
|
it 'does not change the dossier timestamps' do
|
||||||
|
|
Loading…
Add table
Reference in a new issue