diff options
author | Struan Donald <struan@exo.org.uk> | 2012-10-02 17:45:34 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-10-02 18:59:08 +0100 |
commit | 844a16a3c51d69e99ba322a055673364a2a9290d (patch) | |
tree | 2f3dc19c7944d471f9d5f5cb3d7fd45884faab1a /t/app/controller | |
parent | f342b7933e94202935f91f3122e8dfbde75fe54b (diff) |
update tests with new statuses
Diffstat (limited to 't/app/controller')
-rw-r--r-- | t/app/controller/questionnaire.t | 16 | ||||
-rw-r--r-- | t/app/controller/report_display.t | 34 | ||||
-rw-r--r-- | t/app/controller/report_updates.t | 5 |
3 files changed, 53 insertions, 2 deletions
diff --git a/t/app/controller/questionnaire.t b/t/app/controller/questionnaire.t index 3475307fb..872a1733c 100644 --- a/t/app/controller/questionnaire.t +++ b/t/app/controller/questionnaire.t @@ -307,6 +307,10 @@ for my $test ( fixed => 0 }, { + state => 'action scheduled', + fixed => 0 + }, + { state => 'in progress', fixed => 0 }, @@ -315,6 +319,18 @@ for my $test ( fixed => 0 }, { + state => 'duplicate', + fixed => 0 + }, + { + state => 'not responsible', + fixed => 0 + }, + { + state => 'unable to fix', + fixed => 0 + }, + { state => 'closed', fixed => 0 }, diff --git a/t/app/controller/report_display.t b/t/app/controller/report_display.t index 6c2733e36..c10f13547 100644 --- a/t/app/controller/report_display.t +++ b/t/app/controller/report_display.t @@ -252,6 +252,30 @@ for my $test ( fixed => 1 }, { + description => 'duplicate report', + date => DateTime->now, + state => 'duplicate', + banner_id => 'closed', + banner_text => 'closed', + fixed => 0 + }, + { + description => 'not responsible report', + date => DateTime->now, + state => 'not responsible', + banner_id => 'closed', + banner_text => 'closed', + fixed => 0 + }, + { + description => 'unable to fix report', + date => DateTime->now, + state => 'unable to fix', + banner_id => 'closed', + banner_text => 'closed', + fixed => 0 + }, + { description => 'closed report', date => DateTime->now, state => 'closed', @@ -268,6 +292,14 @@ for my $test ( fixed => 0 }, { + description => 'action scheduled eport', + date => DateTime->now, + state => 'action scheduled', + banner_id => 'progress', + banner_text => 'progress', + fixed => 0 + }, + { description => 'planned report', date => DateTime->now, state => 'planned', @@ -276,7 +308,7 @@ for my $test ( fixed => 0 }, { - description => 'in progressreport', + description => 'in progress report', date => DateTime->now, state => 'in progress', banner_id => 'progress', diff --git a/t/app/controller/report_updates.t b/t/app/controller/report_updates.t index 4c8a01cf1..e4cec5f9f 100644 --- a/t/app/controller/report_updates.t +++ b/t/app/controller/report_updates.t @@ -547,6 +547,7 @@ for my $test ( state => 'not responsible', }, state => 'not responsible', + meta => "not the council's responsibility" }, { desc => 'from authority user marks report as duplicate', @@ -559,6 +560,7 @@ for my $test ( state => 'duplicate', }, state => 'duplicate', + meta => 'duplicate report', }, { desc => 'from authority user marks report sent to two councils as fixed', @@ -601,7 +603,8 @@ for my $test ( 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'; + my $meta_state = $test->{meta} || $test->{fields}->{state}; + like $update_meta->[0], qr/marked as $meta_state$/, 'update meta includes state change'; like $update_meta->[0], qr{Test User \(Westminster City Council\)}, 'update meta includes council name'; $mech->content_contains( 'Test User (<strong>Westminster City Council</strong>)', 'council name in bold'); |