refactor(avis): rename revive by remind

This commit is contained in:
Eric Leroy-Terquem 2023-01-26 16:19:06 +01:00
parent 2475bb1098
commit b306dea5cf
7 changed files with 12 additions and 12 deletions

View file

@ -24,13 +24,13 @@ describe Instructeurs::AvisController, type: :controller do
end
end
describe 'revive' do
describe 'remind' do
before do
allow(AvisMailer).to receive(:avis_invitation).and_return(double(deliver_later: nil))
end
it 'sends a reminder to the expert' do
get :revive, params: { procedure_id: procedure.id, id: avis.id }
get :remind, params: { procedure_id: procedure.id, id: avis.id }
expect(AvisMailer).to have_received(:avis_invitation).once.with(avis)
expect(flash.notice).to eq("Un mail de relance a été envoyé à #{avis.expert.email}")
expect(avis.reload.reminded_at).to be_present