Skip to content

Commit

Permalink
made remaining changes and updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
syed87 committed Jun 3, 2024
1 parent 7445fc4 commit d8db245
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/mailers/teacher_mailer.rb
Original file line number Diff line number Diff line change
@@ -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:)
4 changes: 2 additions & 2 deletions spec/mailers/teacher_mailer_spec.rb
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion spec/system/teacher_interface/submitting_spec.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d8db245

Please sign in to comment.