aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-06-23 17:07:10 +0100
committerStruan Donald <struan@exo.org.uk>2011-06-23 17:07:10 +0100
commit7d097bb489deea35ef4fda6002a0d6936bf6b649 (patch)
tree4394c10951d99bd7203c0a30aed520b0f18c5083 /t/app/controller
parentfb56c38856fe33c971903ab0efde1cf5d4829426 (diff)
indicate changes state in update meta information
Diffstat (limited to 't/app/controller')
-rw-r--r--t/app/controller/report_updates.t51
1 files changed, 51 insertions, 0 deletions
diff --git a/t/app/controller/report_updates.t b/t/app/controller/report_updates.t
index 45e8e8c57..5d6f902e3 100644
--- a/t/app/controller/report_updates.t
+++ b/t/app/controller/report_updates.t
@@ -451,6 +451,54 @@ for my $state ( qw/unconfirmed hidden partial/ ) {
for my $test (
{
+ desc => 'from authority user marks report as investigating',
+ fields => {
+ name => $user->name,
+ may_show_name => 1,
+ add_alert => 0,
+ photo => '',
+ update => 'Set state to investigating',
+ state => 'investigating',
+ },
+ state => 'investigating',
+ },
+ {
+ desc => 'from authority user marks report as planned',
+ fields => {
+ name => $user->name,
+ may_show_name => 1,
+ add_alert => 0,
+ photo => '',
+ update => 'Set state to planned',
+ state => 'planned',
+ },
+ state => 'planned',
+ },
+ {
+ desc => 'from authority user marks report as in progress',
+ fields => {
+ name => $user->name,
+ may_show_name => 1,
+ add_alert => 0,
+ photo => '',
+ update => 'Set state to in progress',
+ state => 'in progress',
+ },
+ state => 'in progress',
+ },
+ {
+ desc => 'from authority user marks report as closed',
+ fields => {
+ name => $user->name,
+ may_show_name => 1,
+ add_alert => 0,
+ photo => '',
+ update => 'Set state to closed',
+ state => 'closed',
+ },
+ state => 'closed',
+ },
+ {
desc => 'from authority user marks report as fixed',
fields => {
name => $user->name,
@@ -484,6 +532,9 @@ for my $test (
is $update->text, $test->{fields}->{update}, 'update text';
is $update->problem_state, $test->{state}, 'problem state set';
+ my $update_meta = $mech->extract_update_metas;
+ like $update_meta->[0], qr/marked as $test->{fields}->{state}$/, 'update meta includes state change';
+
$report->discard_changes;
is $report->state, $test->{state}, 'state set';
};