From c9d8f6650d6c5c88c5346032b23d037cf3e4aae6 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 28 Sep 2018 11:12:51 -0700 Subject: Flesh out testing --- test/unit/inbound_email_test.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test/unit/inbound_email_test.rb') diff --git a/test/unit/inbound_email_test.rb b/test/unit/inbound_email_test.rb index 3eedd60472..e4b7be2440 100644 --- a/test/unit/inbound_email_test.rb +++ b/test/unit/inbound_email_test.rb @@ -2,9 +2,12 @@ require_relative '../test_helper' module ActionMailroom class InboundEmailTest < ActiveSupport::TestCase - test "message id is extracted from raw email" do - inbound_email = create_inbound_email_from_fixture("welcome.eml") - assert_equal "0CB459E0-0336-41DA-BC88-E6E28C697DDB@37signals.com", inbound_email.message_id + 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 end end end -- cgit v1.2.3