aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/questionnaire.t
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2015-10-27 13:27:03 +0100
committerMarius Halden <marius.h@lden.org>2015-10-27 13:27:03 +0100
commit4fb5331abd2fa4c89ebeb89bc92a245fadd0aa19 (patch)
tree23632b448612e3845a6e8b1aed6490151395de2a /t/app/controller/questionnaire.t
parente609613b5041a15491417eaa9ae129dd1e7531dd (diff)
parentac39951581a0eefe069c8a707bb89977227d0bce (diff)
Merge tag 'v1.7' into fiksgatami-dev
Diffstat (limited to 't/app/controller/questionnaire.t')
-rw-r--r--t/app/controller/questionnaire.t16
1 files changed, 13 insertions, 3 deletions
diff --git a/t/app/controller/questionnaire.t b/t/app/controller/questionnaire.t
index 5938acc79..2a89454d5 100644
--- a/t/app/controller/questionnaire.t
+++ b/t/app/controller/questionnaire.t
@@ -96,7 +96,7 @@ foreach my $test (
},
{
desc => 'User goes to questionnaire URL for an already answered questionnaire',
- answered => \'ms_current_timestamp()',
+ answered => \'current_timestamp',
content => 'already answered this questionnaire',
},
) {
@@ -191,6 +191,16 @@ foreach my $test (
},
},
{
+ desc => 'Fixed report, reopened, reported before, blank update, no further questionnaire',
+ problem_state => 'fixed',
+ fields => {
+ been_fixed => 'No',
+ reported => 'Yes',
+ another => 'No',
+ update => ' ',
+ },
+ },
+ {
desc => 'Closed report, said fixed, reported before, no update, no further questionnaire',
problem_state => 'closed',
fields => {
@@ -266,7 +276,7 @@ foreach my $test (
$questionnaire->discard_changes;
is $report->state, $result eq 'unknown' ? $test->{problem_state} : $result;
is $report->send_questionnaire, $another;
- ok DateTime::Format::Pg->format_datetime( $report->lastupdate) gt $report_time, 'lastupdate changed'
+ ok (DateTime::Format::Pg->format_datetime( $report->lastupdate) gt $report_time, 'lastupdate changed')
unless $test->{fields}{been_fixed} eq 'Unknown' || $test->{lastupdate_static};
is $questionnaire->old_state, $test->{problem_state};
is $questionnaire->new_state, $result;
@@ -315,7 +325,7 @@ my $comment = FixMyStreet::App->model('DB::Comment')->find_or_create(
);
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( 'Show all updates' );
$mech->content_contains( 'This is some update text' );
};