2018-09-25 19:26:53 -04:00
|
|
|
require_relative '../test_helper'
|
|
|
|
|
2018-09-28 15:19:43 -04:00
|
|
|
module ActionMailbox
|
2018-09-25 19:26:53 -04:00
|
|
|
class InboundEmailTest < ActiveSupport::TestCase
|
2018-09-28 14:12:51 -04:00
|
|
|
test "mail provides the parsed source" do
|
|
|
|
assert_equal "Discussion: Let's debate these attachments", create_inbound_email_from_fixture("welcome.eml").mail.subject
|
|
|
|
end
|
|
|
|
|
|
|
|
test "source returns the contents of the raw email" do
|
|
|
|
assert_equal file_fixture("welcome.eml").read, create_inbound_email_from_fixture("welcome.eml").source
|
2018-09-25 19:26:53 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|