aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/contact.t
diff options
context:
space:
mode:
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';
+ }
+
};
}