diff options
author | Struan Donald <struan@exo.org.uk> | 2011-08-17 22:56:37 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-08-17 22:56:37 +0100 |
commit | 3b5d561700b184c20e63111d4cbc1daab78e16c6 (patch) | |
tree | f0c53c6bf8d4ebf12e5388053ad856fb0d0e7b86 /t/app/controller/contact.t | |
parent | 390f8e8ad1e10f832c4323c39bed2c883744a03f (diff) | |
parent | f38b8e985697c35a62374a2f02dce2d681ef58cd (diff) |
Merge branch 'master' of ssh://git.mysociety.org/data/git/public/fixmystreet into new_statuses
Conflicts:
db/schema.sql
perllib/FixMyStreet/App/Controller/Admin.pm
perllib/FixMyStreet/DB/Result/User.pm
t/app/controller/admin.t
templates/web/default/admin/update_edit.html
web/css/core.css
Diffstat (limited to 't/app/controller/contact.t')
-rw-r--r-- | t/app/controller/contact.t | 11 |
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'; + } + }; } |