aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/contact.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-08-09 18:33:52 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-08-09 18:33:52 +0100
commiteb9fdecc08f346b17c6cf9334a74fe13af69b716 (patch)
tree72f2ecada6ea6978a089dc36335d20dd023e8bd3 /t/app/controller/contact.t
parenta4bfd8e348a5d589c7a3886cd5fe11bd12f17c6d (diff)
parent223c035294f0f3a79ae341349f8f78ffdf61ccd5 (diff)
Merge branch 'admin_abuse_additions'
Diffstat (limited to 't/app/controller/contact.t')
-rw-r--r--t/app/controller/contact.t11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/app/controller/contact.t b/t/app/controller/contact.t
index bbb3a0f83..86b845eb3 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,14 @@ 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};
+
+ $problem_main->discard_changes;
+ if ( $problem_id ) {
+ ok $problem_main->flagged, 'problem flagged';
+ } else {
+ ok !$problem_main->flagged, 'problem not flagged';
+ }
+
};
}