-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1983 from DFE-Digital/consent-emails
Add consent emails
- Loading branch information
Showing
6 changed files
with
221 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Dear <%= application_form_full_name(@application_form) %>, | ||
|
||
We recently wrote to you asking for your consent to verify some of your qualifications as part of your QTS application. | ||
|
||
We have not received your consent documents. If you do not send them by <%= @expires_at.to_fs(:date) %> we will not be able to proceed with your application. | ||
|
||
## What you need to do | ||
|
||
Download each document then: | ||
|
||
- print it | ||
- sign it, making sure your signature is clear | ||
- scan or photograph it | ||
- upload the signed document | ||
|
||
[Sign in to access your documents](<%= new_teacher_session_url %>) | ||
|
||
You need to sign and upload these documents by <%= @expires_at.to_fs(:date) %> so that we can proceed with your application. | ||
|
||
## Why we need your written consent | ||
|
||
We need your written consent so we can share your data with organisations that can verify your qualifications. This is in accordance with UK General Data Protection Regulation (GDPR). | ||
|
||
<%= render "shared/teacher_mailer/footer" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Dear <%= application_form_full_name(@application_form) %>, | ||
|
||
As part of your QTS application we need to verify some of your qualifications. To allow us to do this you need to sign and return a consent document for each qualification we need to verify. | ||
|
||
Consent documents have been added to your application. | ||
|
||
## What you need to do | ||
|
||
Download each document then: | ||
|
||
- print it | ||
- sign it, making sure your signature is clear | ||
- scan or photograph it | ||
- upload the signed document | ||
|
||
[Sign in to access your documents](<%= new_teacher_session_url %>) | ||
|
||
You need to sign and upload these documents by <%= @expires_at.to_fs(:date) %> so that we can proceed with your application. | ||
|
||
## Why we need your written consent | ||
|
||
We need your written consent so we can share your data with organisations that can verify your qualifications. This is in accordance with UK General Data Protection Regulation (GDPR). | ||
|
||
<%= render "shared/teacher_mailer/footer" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Dear <%= application_form_full_name(@application_form) %>, | ||
|
||
Thank you for submitting the consent documents required to progress your QTS application. | ||
|
||
<%= render "shared/teacher_mailer/reference_number" %> | ||
|
||
## What happens next? | ||
|
||
Once an assessor has checked the documents to make sure you’ve provided the required information, they’ll continue reviewing your application. | ||
|
||
If no further information is needed, we’ll contact you with a final QTS application decision once all checks and verifications have been completed. | ||
|
||
<%= render "shared/teacher_mailer/any_questions_contact" %> | ||
|
||
<%= render "shared/teacher_mailer/footer" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,8 @@ | |
) | ||
end | ||
|
||
let(:qualification) { create(:qualification, application_form:) } | ||
|
||
describe "#application_awarded" do | ||
subject(:mail) do | ||
described_class.with(application_form:).application_awarded | ||
|
@@ -256,6 +258,126 @@ | |
it_behaves_like "an observable mailer", "application_received" | ||
end | ||
|
||
describe "#consent_reminder" do | ||
subject(:mail) { described_class.with(application_form:).consent_reminder } | ||
|
||
before do | ||
create( | ||
:qualification_request, | ||
:consent_requested, | ||
assessment:, | ||
consent_requested_at: Date.new(2020, 1, 1), | ||
qualification:, | ||
) | ||
end | ||
|
||
describe "#subject" do | ||
subject(:subject) { mail.subject } | ||
|
||
it do | ||
is_expected.to eq( | ||
"Reminder: we need your written consent to progress your QTS application", | ||
) | ||
end | ||
end | ||
|
||
describe "#to" do | ||
subject(:to) { mail.to } | ||
|
||
it { is_expected.to eq(["[email protected]"]) } | ||
end | ||
|
||
describe "#body" do | ||
subject(:body) { mail.body.encoded } | ||
|
||
it { is_expected.to include("Dear First Last") } | ||
it do | ||
is_expected.to include( | ||
"We recently wrote to you asking for your consent", | ||
) | ||
end | ||
it do | ||
is_expected.to include("If you do not send them by 12 February 2020") | ||
end | ||
end | ||
|
||
it_behaves_like "an observable mailer", "consent_reminder" | ||
end | ||
|
||
describe "#consent_requested" do | ||
subject(:mail) { described_class.with(application_form:).consent_requested } | ||
|
||
before do | ||
create( | ||
:qualification_request, | ||
:consent_requested, | ||
assessment:, | ||
consent_requested_at: Date.new(2020, 1, 1), | ||
qualification:, | ||
) | ||
end | ||
|
||
describe "#subject" do | ||
subject(:subject) { mail.subject } | ||
|
||
it do | ||
is_expected.to eq( | ||
"We need your written consent to progress your QTS application", | ||
) | ||
end | ||
end | ||
|
||
describe "#to" do | ||
subject(:to) { mail.to } | ||
|
||
it { is_expected.to eq(["[email protected]"]) } | ||
end | ||
|
||
describe "#body" do | ||
subject(:body) { mail.body.encoded } | ||
|
||
it { is_expected.to include("Dear First Last") } | ||
it do | ||
is_expected.to include( | ||
"As part of your QTS application we need to verify some of your qualifications", | ||
) | ||
end | ||
it do | ||
is_expected.to include("upload these documents by 12 February 2020") | ||
end | ||
end | ||
|
||
it_behaves_like "an observable mailer", "consent_requested" | ||
end | ||
|
||
describe "#consent_submitted" do | ||
subject(:mail) { described_class.with(application_form:).consent_submitted } | ||
|
||
describe "#subject" do | ||
subject(:subject) { mail.subject } | ||
|
||
it { is_expected.to eq("We’ve received your consent documents") } | ||
end | ||
|
||
describe "#to" do | ||
subject(:to) { mail.to } | ||
|
||
it { is_expected.to eq(["[email protected]"]) } | ||
end | ||
|
||
describe "#body" do | ||
subject(:body) { mail.body.encoded } | ||
|
||
it { is_expected.to include("Dear First Last") } | ||
it do | ||
is_expected.to include("Thank you for submitting the consent documents") | ||
end | ||
it { is_expected.to include("Application reference number: abc") } | ||
end | ||
|
||
it_behaves_like "an observable mailer", "consent_submitted" | ||
end | ||
|
||
describe "#further_information_received" do | ||
subject(:mail) do | ||
described_class.with(application_form:).further_information_received | ||
|