-
Notifications
You must be signed in to change notification settings - Fork 14
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 #142 from alphagov/unsubscribe_link
Unsubscribe link
- Loading branch information
Showing
5 changed files
with
27 additions
and
10 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 |
---|---|---|
|
@@ -115,11 +115,14 @@ def test_template_preview(response) | |
end | ||
|
||
def test_send_email_endpoint(client) | ||
email_resp = client.send_email(email_address: ENV['FUNCTIONAL_TEST_EMAIL'], | ||
template_id: ENV['EMAIL_TEMPLATE_ID'], | ||
personalisation: { "name" => "some name" }, | ||
reference: "some reference", | ||
email_reply_to_id: ENV['EMAIL_REPLY_TO_ID']) | ||
email_resp = client.send_email( | ||
email_address: ENV['FUNCTIONAL_TEST_EMAIL'], | ||
template_id: ENV['EMAIL_TEMPLATE_ID'], | ||
personalisation: { "name" => "some name" }, | ||
reference: "some reference", | ||
email_reply_to_id: ENV['EMAIL_REPLY_TO_ID'], | ||
one_click_unsubscribe_url: "https://www.clovercouncil.gov.uk/[email protected]" | ||
) | ||
test_notification_response_data_type(email_resp, 'email') | ||
email_resp | ||
end | ||
|
@@ -130,7 +133,8 @@ def test_send_email_endpoint_with_document(client) | |
template_id: ENV['EMAIL_TEMPLATE_ID'], | ||
personalisation: { name: Notifications.prepare_upload(f) }, | ||
reference: "some reference", | ||
email_reply_to_id: ENV['EMAIL_REPLY_TO_ID']) | ||
email_reply_to_id: ENV['EMAIL_REPLY_TO_ID'], | ||
one_click_unsubscribe_url: "https://www.clovercouncil.gov.uk/[email protected]") | ||
end | ||
|
||
test_notification_response_data_type(email_resp, 'email') | ||
|
@@ -319,7 +323,8 @@ def expected_fields_in_precompiled_letter_response | |
def expected_fields_in_email_content | ||
%w(from_email | ||
body | ||
subject) | ||
subject | ||
one_click_unsubscribe_url) | ||
end | ||
|
||
def expected_fields_in_sms_content | ||
|
@@ -342,7 +347,8 @@ def expected_fields_in_email_notification | |
template | ||
body | ||
subject | ||
created_at) | ||
created_at | ||
one_click_unsubscribe_url) | ||
end | ||
|
||
def expected_fields_in_email_notification_that_are_nil | ||
|
@@ -381,7 +387,8 @@ def expected_fields_in_sms_notification_that_are_nil | |
postcode | ||
subject | ||
created_by_name | ||
postage) | ||
postage | ||
one_click_unsubscribe_url) | ||
end | ||
|
||
def expected_fields_in_letter_notification | ||
|
@@ -410,6 +417,7 @@ def expected_fields_in_letter_notification_that_are_nil | |
line_5 | ||
line_6 | ||
created_by_name | ||
one_click_unsubscribe_url | ||
) | ||
end | ||
|
||
|
@@ -441,6 +449,7 @@ def expected_fields_in_precompiled_letter_notification_that_are_nil | |
phone_number | ||
postcode | ||
sent_at | ||
one_click_unsubscribe_url | ||
) | ||
end | ||
|
||
|
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
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 |
---|---|---|
|
@@ -9,6 +9,6 @@ | |
|
||
module Notifications | ||
class Client | ||
VERSION = "6.0.0".freeze | ||
VERSION = "6.1.0".freeze | ||
end | ||
end |