diff options
author | Struan Donald <struan@exo.org.uk> | 2011-06-30 22:19:07 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-08-09 18:32:04 +0100 |
commit | 6338f074049779543dcc61e87db0c3afe3a1d719 (patch) | |
tree | 375e47036fabd9c823d8dd67da4c9d27e10e5707 /t/app/controller/contact.t | |
parent | e047565c45b5daa10468851ecf5c7df854efb54e (diff) |
auto flag reported problems
Diffstat (limited to 't/app/controller/contact.t')
-rw-r--r-- | t/app/controller/contact.t | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/app/controller/contact.t b/t/app/controller/contact.t index bbb3a0f83..a69a56ac4 100644 --- a/t/app/controller/contact.t +++ b/t/app/controller/contact.t @@ -248,6 +248,9 @@ for my $test ( ) { subtest 'check email sent correctly' => sub { + $problem_main->discard_changes; + ok !$problem_main->flagged, 'problem not flagged'; + $mech->clear_emails_ok; if ($test->{fields}{id}) { $mech->get_ok('/contact?id=' . $test->{fields}{id}); @@ -267,6 +270,12 @@ for my $test ( my $problem_id = $test->{fields}{id}; like $email->body, qr/Complaint about report $problem_id/, 'reporting a report' if $test->{fields}{id}; + + if ( $problem_id ) { + $problem_main->discard_changes; + ok $problem_main->flagged, 'problem flagged'; + } + }; } |