aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/model/problem.t
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-06-15 16:53:28 +0100
committerStruan Donald <struan@exo.org.uk>2011-06-15 16:53:28 +0100
commit7b2fb6cd9934fae59d89cfeabf5260a54713c26f (patch)
treea1cc6474a0f72175e333ca89cfa13c77b24c9695 /t/app/model/problem.t
parent33074d2d554990621d6941f9c7bf02b7a8ffb18a (diff)
update report display to handle new statuses
Diffstat (limited to 't/app/model/problem.t')
-rw-r--r--t/app/model/problem.t44
1 files changed, 44 insertions, 0 deletions
diff --git a/t/app/model/problem.t b/t/app/model/problem.t
index 1b8804fce..5a5eb2520 100644
--- a/t/app/model/problem.t
+++ b/t/app/model/problem.t
@@ -152,4 +152,48 @@ for my $test (
};
}
+for my $test (
+ {
+ state => 'unconfirmed',
+ is_open => 1,
+ },
+ {
+ state => 'confirmed',
+ is_open => 1,
+ },
+ {
+ state => 'investigating',
+ is_open => 1,
+ },
+ {
+ state => 'planned',
+ is_open => 1,
+ },
+ {
+ state => 'in progress',
+ is_open => 1,
+ },
+ {
+ state => 'fixed',
+ is_open => 0,
+ },
+ {
+ state => 'fixed - council',
+ is_open => 0,
+ },
+ {
+ state => 'fixed - user',
+ is_open => 0,
+ },
+ {
+ state => 'will not fix',
+ is_open => 0,
+ },
+) {
+ subtest $test->{state} . ' is open/closed' => sub {
+ $problem->state( $test->{state} );
+ is $problem->is_open, $test->{is_open}, 'is_open';
+ };
+}
+
done_testing();