aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-08-16 21:12:52 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-08-17 10:35:26 +0100
commit5adab230b81a635c578977fb96ded280ea9f4bdf (patch)
treea513fcebedacdc776b27e826b1b7b525abc98ffa /t
parentaf6c868217414cd50280da78f92487a255e951f6 (diff)
Make sure no questionnaire emails outstanding at start of test.
Diffstat (limited to 't')
-rw-r--r--t/app/controller/questionnaire.t6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/app/controller/questionnaire.t b/t/app/controller/questionnaire.t
index 14ceb3212..3475307fb 100644
--- a/t/app/controller/questionnaire.t
+++ b/t/app/controller/questionnaire.t
@@ -8,6 +8,12 @@ use FixMyStreet::App::Controller::Questionnaire;
ok( my $mech = FixMyStreet::TestMech->new, 'Created mech object' );
+# Make sure there's no outstanding questionnaire emails to be sent
+FixMyStreet::App->model('DB::Questionnaire')->send_questionnaires( {
+ site => 'fixmystreet'
+} );
+$mech->clear_emails_ok;
+
# create a test user and report
$mech->delete_user('test@example.com');