aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailbox/test/unit/inbound_email_test.rb
blob: 993423406fd88402a2452dc657b23c85853c8681 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

require_relative "../test_helper"

module ActionMailbox
  class InboundEmailTest < ActiveSupport::TestCase
    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