aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/generators/test_unit/mailer/templates/functional_test.rb
blob: fcebb40135069c356ceaef4223e033e7fcfe28c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'test_helper'

class <%= class_name %>Test < ActionMailer::TestCase
<% for action in actions -%>
  test "<%= action %>" do
    @expected.subject = <%= action.to_s.humanize.inspect %>
    @expected.to      = "to@example.com"
    @expected.from    = "from@example.com"
    @expected.body    = read_fixture("<%= action %>")
    @expected.date    = Time.now

    assert_equal @expected, <%= class_name %>.<%= action %>
  end

<% end -%>
<% if actions.blank? -%>
  # replace this with your real tests
  test "the truth" do
    assert true
  end
<% end -%>
end