fix(spec): apparently we do store time with zone

This commit is contained in:
Martin 2021-11-15 14:35:43 +01:00
parent 4042d51d1a
commit f1293814a3
2 changed files with 2 additions and 2 deletions

View file

@ -28,7 +28,7 @@ class CommentaireService
if commentaire.sent_by?(user)
commentaire.piece_jointe.purge_later if commentaire.piece_jointe.attached?
commentaire.update!(body: I18n.t('views.shared.commentaires.destroy.deleted_body'),
deleted_at: Time.zone.now.utc)
deleted_at: Time.zone.now)
OpenStruct.new(status: true)
else
OpenStruct.new(status: false,

View file

@ -104,7 +104,7 @@ describe CommentaireService do
end
it 'set deleted_at' do
Timecop.freeze do
expect { subject }.to change { commentaire.reload.deleted_at }.from(nil).to(Time.zone.now.utc)
expect { subject }.to change { commentaire.reload.deleted_at }.from(nil).to(Time.zone.now)
end
end
end