diff --git a/app/jobs/priorized_mail_delivery_job.rb b/app/jobs/priorized_mail_delivery_job.rb index 2404e3912..bf0ea10b7 100644 --- a/app/jobs/priorized_mail_delivery_job.rb +++ b/app/jobs/priorized_mail_delivery_job.rb @@ -13,6 +13,6 @@ class PriorizedMailDeliveryJob < ActionMailer::MailDeliveryJob 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 180877eb1..6cba576f0 100644 --- a/spec/mailers/administrateur_mailer_spec.rb +++ b/spec/mailers/administrateur_mailer_spec.rb @@ -11,8 +11,8 @@ RSpec.describe AdministrateurMailer, type: :mailer do 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 @@ end 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 28667228e..ede31bfae 100644 --- a/spec/mailers/instructeur_mailer_spec.rb +++ b/spec/mailers/instructeur_mailer_spec.rb @@ -10,9 +10,9 @@ RSpec.describe InstructeurMailer, type: :mailer do 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 @@ RSpec.describe InstructeurMailer, type: :mailer do 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 aa2b1812a..3ef0c4fce 100644 --- a/spec/mailers/user_mailer_spec.rb +++ b/spec/mailers/user_mailer_spec.rb @@ -151,8 +151,8 @@ RSpec.describe UserMailer, type: :mailer do 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 @@ RSpec.describe UserMailer, type: :mailer do 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 @@ RSpec.describe UserMailer, type: :mailer do 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