Commit c8e36b08bc643c05006df2e2eefa1c043e819e69
1 parent
4ef1070c
Exists in
master
and in
29 other branches
Fixed some tests
(ActionItem2042)
Showing
2 changed files
with
4 additions
and
4 deletions
Show diff stats
app/views/contact/sender/mail.rhtml
| ... | ... | @@ -8,8 +8,8 @@ |
| 8 | 8 | {:sender => @name, :target => @target, :environment => @environment} %></p> |
| 9 | 9 | <%= _('Information about the user who sent this message:')%> |
| 10 | 10 | <ul> |
| 11 | - <li><%= content_tag('b', _('Name')+': ') + @name%></li> | |
| 12 | - <li><%= content_tag('b', _('Email')+': ') + @email%></li> | |
| 11 | + <li><%= content_tag('b', _('Name')+': ') + @name.to_s %></li> | |
| 12 | + <li><%= content_tag('b', _('Email')+': ') + @email.to_s %></li> | |
| 13 | 13 | <% if @city || @state %> |
| 14 | 14 | <li><%= content_tag('b', _('City and state')+': ') + (@city || '?')+'/'+(@state || '?') %></li> |
| 15 | 15 | <% end %> | ... | ... |
test/unit/contact_sender_test.rb
| ... | ... | @@ -16,8 +16,8 @@ class ContactSenderTest < Test::Unit::TestCase |
| 16 | 16 | ent.contact_email = 'contact@invalid.com' |
| 17 | 17 | c = build(Contact, :dest => ent) |
| 18 | 18 | response = Contact::Sender.deliver_mail(c) |
| 19 | - assert_equal c.email, response.from | |
| 20 | - assert_equal c.subject, response.subject | |
| 19 | + assert_equal Environment.default.contact_email, response.from.to_s | |
| 20 | + assert_equal "[#{ent.name}] #{c.subject}", response.subject | |
| 21 | 21 | end |
| 22 | 22 | |
| 23 | 23 | should 'deliver mail to contact_email' do | ... | ... |