aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/questionnaire.t
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-08-22 10:57:10 +0100
committerStruan Donald <struan@exo.org.uk>2012-08-22 10:57:10 +0100
commit2e0a4e8ec45579e4e5c9cf8aa123d5ab215b9703 (patch)
treec13e3c59b686e01460dc7960547f7e9c53c288bd /t/app/controller/questionnaire.t
parentb99c5ff97b29a27eeba52ed24385ac30388e875c (diff)
parent88a7d38dffa3dabdf0f85573b254cea9c8ab232b (diff)
Merge remote-tracking branch 'origin/master' into fmb-read-only
Conflicts: .gitignore bin/make_css conf/general.yml-example perllib/FixMyStreet/App/Controller/Council.pm perllib/FixMyStreet/App/Controller/Report/New.pm perllib/FixMyStreet/Cobrand/Default.pm templates/web/default/around/around_index.html templates/web/default/index.html templates/web/emptyhomes/index.html templates/web/fixmystreet/around/around_index.html templates/web/fixmystreet/index.html web/fixmystreet_app_cgi.cgi web/fixmystreet_app_fastcgi.cgi
Diffstat (limited to 't/app/controller/questionnaire.t')
-rw-r--r--t/app/controller/questionnaire.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/app/controller/questionnaire.t b/t/app/controller/questionnaire.t
index 2d4fdb711..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');
@@ -273,6 +279,23 @@ foreach my $test (
};
}
+my $comment = FixMyStreet::App->model('DB::Comment')->find_or_create(
+ {
+ problem_id => $report->id,
+ user_id => $user->id,
+ name => 'A User',
+ mark_fixed => 'false',
+ text => 'This is some update text',
+ state => 'confirmed',
+ confirmed => $sent_time,
+ anonymous => 'f',
+ }
+);
+subtest 'Check updates are shown correctly on questionnaire page' => sub {
+ $mech->get_ok("/Q/" . $token->token);
+ $mech->content_contains( 'updates that have been left' );
+ $mech->content_contains( 'This is some update text' );
+};
for my $test (
{