diff --git a/test/unit/custom_workflow_mailer_test.rb b/test/unit/custom_workflow_mailer_test.rb index 73623a4..eeb9513 100644 --- a/test/unit/custom_workflow_mailer_test.rb +++ b/test/unit/custom_workflow_mailer_test.rb @@ -39,11 +39,19 @@ def test_truth assert_kind_of User, @user2 end - def test_custom_email - CustomWorkflowMailer.deliver_custom_email @user2, subject: 'Subject', text_body: 'Body', html_body: 'Body' + # def test_custom_email + # CustomWorkflowMailer.deliver_custom_email @user2, subject: 'Subject', text_body: 'Body', html_body: 'Body' + # email = last_email + # assert text_part(email).body.include?('Body'), text_part(email).body + # assert html_part(email).body.include?('Body'), html_part(email).body + # end + + def test_custom_email_template + CustomWorkflowMailer.deliver_custom_email @user2, subject: 'Subject', template_name: 'mailer/my_email', + template_params: { url: Rails.root } email = last_email - assert text_part(email).body.include?('Body'), text_part(email).body - assert html_part(email).body.include?('Body'), html_part(email).body + assert text_part(email).body.include?('Body'), Rails.root.to_s + assert html_part(email).body.include?('Body'), Rails.root.to_s end private