Merge pull request #9971 from demarches-simplifiees/harmonize-merci-message-from-admin-apercu-to-user-ldu

ETQ admin, je veux que le message de fin de dépot d'une démarche déclarative soit correct
This commit is contained in:
Colin Darie 2024-02-14 15:14:20 +00:00 committed by GitHub
commit a9b24b897e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -11,7 +11,7 @@
%strong= t('views.users.dossiers.merci.dossier_acces_l2')
%p.m-2
= t('views.users.dossiers.merci.dossier_edit_l1')
- if !dossier&.read_only?
- if !dossier&.read_only? && !procedure.declarative_accepte? && !procedure.sva_svr_enabled?
%strong= t('views.users.dossiers.merci.dossier_edit_l2')
= t('views.users.dossiers.merci.dossier_edit_l3')
%strong= t('views.users.dossiers.merci.dossier_edit_l4')

View file

@ -75,6 +75,8 @@ RSpec.describe ApplicationMailer, type: :mailer do
let(:user1) { create(:user) }
let(:user2) { create(:user, email: "your@email.com") }
before { freeze_time }
it 'creates a new EmailEvent record with the correct information' do
expect { UserMailer.ask_for_merge(user1, user2.email).deliver_now }.to change { EmailEvent.count }.by(2)
event = EmailEvent.last
@ -83,7 +85,7 @@ RSpec.describe ApplicationMailer, type: :mailer do
expect(event.to).to eq("your@email.com")
expect(event.method).to eq("test")
expect(event.subject).to eq('Fusion de compte')
expect(event.processed_at).to be_within(1.second).of(Time.zone.now)
expect(event.processed_at).to eq(Time.current)
expect(event.status).to eq('dispatched')
end
end