diff --git a/actionmailbox/test/controllers/rails/action_mailbox/inbound_emails_controller_test.rb b/actionmailbox/test/controllers/rails/action_mailbox/inbound_emails_controller_test.rb index 9da1c043034..fcd9ad839f0 100644 --- a/actionmailbox/test/controllers/rails/action_mailbox/inbound_emails_controller_test.rb +++ b/actionmailbox/test/controllers/rails/action_mailbox/inbound_emails_controller_test.rb @@ -10,15 +10,19 @@ class Rails::Conductor::ActionMailbox::InboundEmailsControllerTest < ActionDispa mail: { from: "Jason Fried ", to: "Replies ", - bcc: "", in_reply_to: "<4e6e35f5a38b4_479f13bb90078178@small-app-01.mail>", - subject: "Create", - body: "New Mail" + subject: "Hey there", + body: "How's it going?" } } end - assert_equal "New Mail", ActionMailbox::InboundEmail.last.mail.decoded + mail = ActionMailbox::InboundEmail.last.mail + assert_equal %w[ jason@37signals.com ], mail.from + assert_equal %w[ replies@example.com ], mail.to + assert_equal "4e6e35f5a38b4_479f13bb90078178@small-app-01.mail", mail.in_reply_to + assert_equal "Hey there", mail.subject + assert_equal "How's it going?", mail.body.decoded end end @@ -29,18 +33,16 @@ class Rails::Conductor::ActionMailbox::InboundEmailsControllerTest < ActionDispa mail: { from: "Jason Fried ", to: "Replies ", - bcc: "", - in_reply_to: "<4e6e35f5a38b4_479f13bb90078178@small-app-01.mail>", - subject: "Discussion: Let's debate these attachments", + subject: "Let's debate some attachments", body: "Let's talk about these images:", - attachments: [fixture_file_upload("files/avatar1.jpeg"), fixture_file_upload("files/avatar2.jpeg")] + attachments: [ fixture_file_upload("files/avatar1.jpeg"), fixture_file_upload("files/avatar2.jpeg") ] } } end mail = ActionMailbox::InboundEmail.last.mail - assert_equal 2, mail.attachments.size assert_equal "Let's talk about these images:", mail.text_part.decoded + assert_equal 2, mail.attachments.count end end