diff --git a/app/jobs/priorized_mail_delivery_job.rb b/app/jobs/priorized_mail_delivery_job.rb index 2404e391288..bf0ea10b743 100644 --- a/app/jobs/priorized_mail_delivery_job.rb +++ b/app/jobs/priorized_mail_delivery_job.rb @@ -13,6 +13,6 @@ def queue_name end def custom_queue - 'low' + 'default' end end diff --git a/spec/mailers/administrateur_mailer_spec.rb b/spec/mailers/administrateur_mailer_spec.rb index 180877eb1bb..6cba576f0c4 100644 --- a/spec/mailers/administrateur_mailer_spec.rb +++ b/spec/mailers/administrateur_mailer_spec.rb @@ -11,8 +11,8 @@ it { expect(subject.subject).to include("La suppression automatique des dossiers a été activée sur la démarche") } context 'when perform_later is called' do - let(:custom_queue) { 'low' } - it 'enqueues email is custom queue for low priority delivery' do + let(:custom_queue) { 'default' } + it 'enqueues email is custom queue for non critical delivery' do expect { subject.deliver_later }.to have_enqueued_job.on_queue(custom_queue) end end @@ -51,8 +51,8 @@ it { expect(subject.body).to include("un de vos services n'a pas son siret renseigné") } context 'when perform_later is called' do - let(:custom_queue) { 'low' } - it 'enqueues email is custom queue for low priority delivery' do + let(:custom_queue) { 'default' } + it 'enqueues email is custom queue for non critical delivery' do expect { subject.deliver_later }.to have_enqueued_job.on_queue(custom_queue) end end diff --git a/spec/mailers/instructeur_mailer_spec.rb b/spec/mailers/instructeur_mailer_spec.rb index 28667228ea3..ede31bfae47 100644 --- a/spec/mailers/instructeur_mailer_spec.rb +++ b/spec/mailers/instructeur_mailer_spec.rb @@ -10,9 +10,9 @@ it { expect(subject.body).to include('Bonjour') } context 'when perform_later is called' do - let(:custom_queue) { 'low' } + let(:custom_queue) { 'default' } - it 'enqueues email is custom queue for low priority delivery' do + it 'enqueues email is custom queue for non critical delivery' do expect { subject.deliver_later }.to have_enqueued_job(PriorizedMailDeliveryJob).on_queue(custom_queue) end end @@ -80,8 +80,8 @@ end context 'when perform_later is called' do - let(:custom_queue) { 'low' } - it 'enqueues email is custom queue for low priority delivery' do + let(:custom_queue) { 'default' } + it 'enqueues email is custom queue for non critical delivery' do expect { subject.deliver_later }.to have_enqueued_job.on_queue(custom_queue) end end diff --git a/spec/mailers/user_mailer_spec.rb b/spec/mailers/user_mailer_spec.rb index aa2b1812aa6..3ef0c4fce6a 100644 --- a/spec/mailers/user_mailer_spec.rb +++ b/spec/mailers/user_mailer_spec.rb @@ -151,8 +151,8 @@ context 'when perform_later is called' do let(:role) { administrateurs(:default_admin) } - let(:custom_queue) { 'low' } - it 'enqueues email is custom queue for low priority delivery' do + let(:custom_queue) { 'default' } + it 'enqueues email is custom queue for non critical delivery' do expect { subject.deliver_later }.to have_enqueued_job.on_queue(custom_queue) end end @@ -167,8 +167,8 @@ end context 'when perform_later is called' do - let(:custom_queue) { 'low' } - it 'enqueues email is custom queue for low priority delivery' do + let(:custom_queue) { 'default' } + it 'enqueues email is custom queue for non critical delivery' do expect { subject.deliver_later }.to have_enqueued_job.on_queue(custom_queue) end end @@ -181,13 +181,13 @@ it 'notifies user about procedure closing with detailed message' do expect(subject.to).to eq([user.email]) - expect(subject.body).to include("Clôture d'une démarche sur demarches-simplifiees.fr") + expect(subject.body).to include("Clôture d'une démarche sur #{APPLICATION_NAME}") expect(subject.body).to include("Bonjour,\r\n
saut de ligne") end context 'when perform_later is called' do - let(:custom_queue) { 'low' } - it 'enqueues email is custom queue for low priority delivery' do + let(:custom_queue) { 'default' } + it 'enqueues email is custom queue for non critical delivery' do expect { subject.deliver_later }.to have_enqueued_job.on_queue(custom_queue) end end