aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/app/controller/questionnaire.t2
-rw-r--r--t/cobrand/zurich.t22
2 files changed, 21 insertions, 3 deletions
diff --git a/t/app/controller/questionnaire.t b/t/app/controller/questionnaire.t
index d4fc9c74b..2a89454d5 100644
--- a/t/app/controller/questionnaire.t
+++ b/t/app/controller/questionnaire.t
@@ -276,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;
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t
index 02f502d31..5dbbc3bbe 100644
--- a/t/cobrand/zurich.t
+++ b/t/cobrand/zurich.t
@@ -705,8 +705,6 @@ subtest "test stats" => sub {
$mech->content_contains('fixed - council');
$mech->content_contains(',hidden,');
}
-
- $mech->log_out_ok;
};
};
@@ -764,6 +762,26 @@ subtest 'email images to external partners' => sub {
};
};
+subtest 'time_spent' => sub {
+ FixMyStreet::override_config {
+ ALLOWED_COBRANDS => [ 'zurich' ],
+ }, sub {
+ my $report = $reports[0];
+
+ is $report->get_time_spent, 0, '0 minutes spent';
+ $report->update({ state => 'in progress' });
+ $mech->get_ok( '/admin/report_edit/' . $report->id );
+ $mech->form_with_fields( 'time_spent' );
+ $mech->submit_form_ok( {
+ with_fields => {
+ time_spent => 10,
+ } });
+ is $report->get_time_spent, 10, '10 minutes spent';
+ };
+};
+
+$mech->log_out_ok;
+
END {
$mech->delete_body($subdivision);
$mech->delete_body($division);