Commit a2d9ed262152d570e78cf0b5663592b2dbd92460
1 parent
a8c4d71a
Exists in
master
and in
29 other branches
rails3: partial fix for Invitation unit tests
2 broken tests waiting for the migration to the new ActionMailer API
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
test/unit/invitation_test.rb
@@ -4,11 +4,11 @@ class InvitationTest < ActiveSupport::TestCase | @@ -4,11 +4,11 @@ class InvitationTest < ActiveSupport::TestCase | ||
4 | 4 | ||
5 | should 'expand message' do | 5 | should 'expand message' do |
6 | invitation = Invitation.new( | 6 | invitation = Invitation.new( |
7 | - :person => Person.new(:name => 'Sadam', :environment => Environment.new(:name => 'AnarquiaOi')), | 7 | + :person => create_user('sadam', {}, :name => 'Sadam').person, |
8 | :friend_name => 'Fernandinho', | 8 | :friend_name => 'Fernandinho', |
9 | :message => 'Hi <friend>, <user> is inviting you to <environment>!' | 9 | :message => 'Hi <friend>, <user> is inviting you to <environment>!' |
10 | ) | 10 | ) |
11 | - assert_equal 'Hi Fernandinho, Sadam is inviting you to AnarquiaOi!', invitation.expanded_message | 11 | + assert_equal 'Hi Fernandinho, Sadam is inviting you to %s!' % Environment.default.name, invitation.expanded_message |
12 | end | 12 | end |
13 | 13 | ||
14 | should 'require subclasses implement mail_template method' do | 14 | should 'require subclasses implement mail_template method' do |