-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated ApplicationMailer so that it explicitly imports helpers (Rail…
…s views don't have a 'helper' method). Added en localization entries for email and PDF generation. Updated tests pertaining to PDFs and mailing (#66)
- Loading branch information
1 parent
7bff2a0
commit 99b56bb
Showing
7 changed files
with
30 additions
and
8 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
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
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 |
---|---|---|
@@ -1,13 +1,16 @@ | ||
# Preview all emails at http://localhost:3000/rails/mailers/applicant_mailer | ||
require Rails.root.join('spec/support/test_helpers') | ||
class ApplicantMailerPreview < ActionMailer::Preview | ||
include ViewHelper | ||
include TestHelpers # in order to use stub_payments | ||
|
||
def invitation_email | ||
ApplicantMailer.with(email_address: "test@example.com", link: "http://example.com").invitation_email | ||
end | ||
|
||
def caseworker_summary_email | ||
payments = stub_payments | ||
|
||
cbv_flow = CbvFlow.create(case_number: "ABC1234", argyle_user_id: "abc-def-ghi", email_address: "test@example.com") | ||
payments = stub_payments | ||
cbv_flow = CbvFlow.create(case_number: "ABC1234", argyle_user_id: "abc-def-ghi") | ||
ApplicantMailer.with(cbv_flow: cbv_flow, case_number: "12345", payments: payments).caseworker_summary_email | ||
end | ||
end |
Binary file not shown.