Class: ActionMailerWithinApplicationTest

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
vendor/plugins/engines/test/unit/action_mailer_test.rb

Instance Method Summary

Instance Method Details

- (Object) test_action_mailer_can_get_helper



10
11
12
13
14
# File 'vendor/plugins/engines/test/unit/action_mailer_test.rb', line 10

def test_action_mailer_can_get_helper
  m = NotifyMail.('James')
  assert m.body =~ /James/
  assert m.body =~ /semaJ/ # from the helper
end

- (Object) test_multipart_mails_with_explicit_templates



16
17
18
19
20
21
# File 'vendor/plugins/engines/test/unit/action_mailer_test.rb', line 16

def test_multipart_mails_with_explicit_templates
  m = NotifyMail.create_multipart
  assert_equal 2, m.parts.length
  assert_equal 'the html part of the email james', m.parts[0].body
  assert_equal 'the plaintext part of the email', m.parts[1].body
end

- (Object) test_multipart_mails_with_implicit_templates



23
24
25
26
27
28
# File 'vendor/plugins/engines/test/unit/action_mailer_test.rb', line 23

def test_multipart_mails_with_implicit_templates
  m = NotifyMail.create_implicit_multipart
  assert_equal 2, m.parts.length
  assert_equal 'the implicit plaintext part of the email', m.parts[0].body    
  assert_equal 'the implicit html part of the email james', m.parts[1].body
end

- (Object) test_normal_implicit_template



5
6
7
8
# File 'vendor/plugins/engines/test/unit/action_mailer_test.rb', line 5

def test_normal_implicit_template
  m = NotifyMail.("hello")
  assert m.body =~ /^Signup template from application/
end