Sha256: 40ffdd8122ee205cc61132c4fe35b44d7b5d08005274ad6810c27c36cf55a397

Contents?: true

Size: 711 Bytes

Versions: 3

Compression:

Stored size: 711 Bytes

Contents

require File.expand_path('helper', File.dirname(__FILE__))

class MailerHelperMethodsTest < MiniTest::Test
  def test_mailer_helper_methods
    request = PostageApp::Request.new(
      :send_message,
      :headers => {
        'from' => 'sender@test.test',
        'subject' => 'Test Message'
      },
      :recipients => 'test@test.test',
      :content => {
        'text/plain' => 'text content',
        'text/html' => 'html content'
      }
    )

    assert_equal [ 'test@test.test' ], request.to
    assert_equal [ 'sender@test.test' ], request.from
    assert_equal 'Test Message', request.subject

    assert_match 'html content', request.body
    assert_match 'text content', request.body
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
postageapp-1.2.6 test/mailer_helper_methods_test.rb
postageapp-1.2.5 test/mailer_helper_methods_test.rb
postageapp-1.2.0 test/mailer_helper_methods_test.rb