Sha256: 184d6c2473f913f8339c83585bada88e8b6afc6724b1cbf19832d4e8e2ccf3e1
Contents?: true
Size: 1021 Bytes
Versions: 2
Compression:
Stored size: 1021 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../test_helper') class EmailAfterBeingDeliveredTest < Test::Unit::TestCase def setup ActionMailer::Base.deliveries = [] @email = new_email( :subject => 'Hello', :body => 'How are you?', :sender => create_email_address(:spec => 'webmaster@localhost'), :to => create_email_address(:spec => 'partners@localhost'), :cc => create_email_address(:spec => 'support@localhost'), :bcc => create_email_address(:spec => 'feedback@localhost') ) assert @email.deliver! end def test_should_send_mail assert ActionMailer::Base.deliveries.any? delivery = ActionMailer::Base.deliveries.first assert_equal 'Hello', delivery.subject assert_equal 'How are you?', delivery.body assert_equal ['webmaster@localhost'], delivery.from assert_equal ['partners@localhost'], delivery.to assert_equal ['support@localhost'], delivery.cc assert_equal ['feedback@localhost'], delivery.bcc end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
has_emails-0.1.0 | test/unit/email_test.rb |
has_emails-0.1.1 | test/unit/email_test.rb |