diff options
author | Struan Donald <struan@exo.org.uk> | 2011-08-19 00:08:15 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-08-19 00:08:15 +0100 |
commit | a9a4fed583d7467c9c1f1fa56d42bcb75b4b488c (patch) | |
tree | 72941901b1bad732047bc6289139a387b049e6e8 /t/app/model/problem.t | |
parent | 302f5961f5da13e8124e8d2e91e52a29f141946f (diff) | |
parent | 61e6d5928be1bedb68607f8fa36f0d971711a3f8 (diff) |
Merge branch 'new_statuses'
Diffstat (limited to 't/app/model/problem.t')
-rw-r--r-- | t/app/model/problem.t | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/t/app/model/problem.t b/t/app/model/problem.t index 1b8804fce..4c6be6a8d 100644 --- a/t/app/model/problem.t +++ b/t/app/model/problem.t @@ -152,4 +152,92 @@ for my $test ( }; } +for my $test ( + { + state => 'partial', + is_visible => 0, + is_fixed => 0, + is_open => 0, + is_closed => 0, + }, + { + state => 'hidden', + is_visible => 0, + is_fixed => 0, + is_open => 0, + is_closed => 0, + }, + { + state => 'unconfirmed', + is_visible => 0, + is_fixed => 0, + is_open => 0, + is_closed => 0, + }, + { + state => 'confirmed', + is_visible => 1, + is_fixed => 0, + is_open => 1, + is_closed => 0, + }, + { + state => 'investigating', + is_visible => 1, + is_fixed => 0, + is_open => 1, + is_closed => 0, + }, + { + state => 'planned', + is_visible => 1, + is_fixed => 0, + is_open => 1, + is_closed => 0, + }, + { + state => 'in progress', + is_visible => 1, + is_fixed => 0, + is_open => 1, + is_closed => 0, + }, + { + state => 'fixed', + is_visible => 1, + is_fixed => 1, + is_open => 0, + is_closed => 0, + }, + { + state => 'fixed - council', + is_visible => 1, + is_fixed => 1, + is_open => 0, + is_closed => 0, + }, + { + state => 'fixed - user', + is_visible => 1, + is_fixed => 1, + is_open => 0, + is_closed => 0, + }, + { + state => 'closed', + is_visible => 1, + is_fixed => 0, + is_open => 0, + is_closed => 1, + }, +) { + subtest $test->{state} . ' is fixed/open/closed/visible' => sub { + $problem->state( $test->{state} ); + is $problem->is_visible, $test->{is_visible}, 'is_visible'; + is $problem->is_fixed, $test->{is_fixed}, 'is_fixed'; + is $problem->is_closed, $test->{is_closed}, 'is_closed'; + is $problem->is_open, $test->{is_open}, 'is_open'; + }; +} + done_testing(); |