From d8db2459f332af47be7bbb7d9808956437906036 Mon Sep 17 00:00:00 2001 From: Shujat Khalid Date: Mon, 3 Jun 2024 13:27:17 +0100 Subject: [PATCH] made remaining changes and updated tests --- app/mailers/teacher_mailer.rb | 4 ++-- spec/mailers/teacher_mailer_spec.rb | 4 ++-- spec/system/teacher_interface/submitting_spec.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/mailers/teacher_mailer.rb b/app/mailers/teacher_mailer.rb index 83e1c3a1eb..c24cc2fd6a 100644 --- a/app/mailers/teacher_mailer.rb +++ b/app/mailers/teacher_mailer.rb @@ -51,12 +51,12 @@ def application_not_submitted def application_received subject = if @application_form.teaching_authority_provides_written_statement - I18n.t("mailer.teacher.application_received.subject.without_document") - else I18n.t( "mailer.teacher.application_received.subject.awaiting_document", certificate: region_certificate_name(region), ) + else + I18n.t("mailer.teacher.application_received.subject.without_document") end view_mail(GOVUK_NOTIFY_TEMPLATE_ID, to: teacher.email, subject:) diff --git a/spec/mailers/teacher_mailer_spec.rb b/spec/mailers/teacher_mailer_spec.rb index a68a5ffac3..cfa046051f 100644 --- a/spec/mailers/teacher_mailer_spec.rb +++ b/spec/mailers/teacher_mailer_spec.rb @@ -207,7 +207,7 @@ ) end - it { is_expected.to include("Your QTS application has been received") } + it { is_expected.to include("Your QTS application: Awaiting Letter of Professional Standing") } end context "if the teaching authority does not provide the written statement" do @@ -221,7 +221,7 @@ it do is_expected.to include( - "Your QTS application: Awaiting Letter of Professional Standing", + "Your QTS application has been received", ) end end diff --git a/spec/system/teacher_interface/submitting_spec.rb b/spec/system/teacher_interface/submitting_spec.rb index 3f932c7b98..f8feb4aeed 100644 --- a/spec/system/teacher_interface/submitting_spec.rb +++ b/spec/system/teacher_interface/submitting_spec.rb @@ -59,7 +59,7 @@ def and_i_receive_an_application_email expect(message).to_not be_nil expect(message.subject).to eq( - "Your QTS application: Awaiting Letter of Professional Standing", + "Your QTS application has been received", ) expect(message.to).to include("teacher@example.com") end