diff options
Diffstat (limited to 't/app/controller/contact.t')
-rw-r--r-- | t/app/controller/contact.t | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/t/app/controller/contact.t b/t/app/controller/contact.t index 1b0f09a85..dd94fc431 100644 --- a/t/app/controller/contact.t +++ b/t/app/controller/contact.t @@ -251,16 +251,16 @@ for my $test ( } $mech->submit_form_ok( { with_fields => $test->{fields} } ); $mech->content_contains('Thank you for your feedback'); - $mech->email_count_is(1); my $email = $mech->get_email; is $email->header('Subject'), 'FMS message: ' . $test->{fields}->{subject}, 'subject'; is $email->header('From'), "\"$test->{fields}->{name}\" <$test->{fields}->{em}>", 'from'; - like $email->body, qr/$test->{fields}->{message}/, 'body'; - like $email->body, qr/Sent by contact.cgi on \S+. IP address (?:\d{1,3}\.){3,}\d{1,3}/, 'body footer'; + my $body = $mech->get_text_body_from_email($email); + like $body, qr/$test->{fields}->{message}/, 'body'; + like $body, qr/Sent by contact.cgi on \S+. IP address (?:\d{1,3}\.){3,}\d{1,3}/, 'body footer'; my $problem_id = $test->{fields}{id}; - like $email->body, qr/Complaint about report $problem_id/, 'reporting a report' + like $body, qr/Complaint about report $problem_id/, 'reporting a report' if $test->{fields}{id}; $problem_main->discard_changes; |