Created
January 25, 2013 18:06
-
-
Save rsl/4636547 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
class SubscriptionNotifierTest < ActionMailer::TestCase | |
fixtures :companies | |
should_eventually "test other subscription mailer actions" | |
test 'should send cancellation email' do | |
company = companies(:no_categories) | |
email = SubscriptionNotifier.cancelled_subscription(company).deliver | |
assert_contains email.to, 'something@somethingelse.com' | |
assert_equal "Cancelled Subscription", email.subject | |
assert_match /#{company.organization} subscription has been cancelled/, email.body | |
end | |
end | |
# raises TypeError: can't convert Mail::Body to String |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment