diff options
Diffstat (limited to 't/app/controller/report_display.t')
-rw-r--r-- | t/app/controller/report_display.t | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/t/app/controller/report_display.t b/t/app/controller/report_display.t index 23b76fbc4..a70d5b9e9 100644 --- a/t/app/controller/report_display.t +++ b/t/app/controller/report_display.t @@ -313,16 +313,25 @@ for my $test ( desc => 'no state dropdown if user not from authority', from_council => 0, no_state => 1, + report_council => '2504', }, { desc => 'state dropdown if user from authority', from_council => 2504, no_state => 0, + report_council => '2504', }, { desc => 'no state dropdown if user not from same council as problem', from_council => 2505, no_state => 1, + report_council => '2504', + }, + { + desc => 'state dropdown if user from authority and problem sent to multiple councils', + from_council => 2504, + no_state => 0, + report_council => '2504,2506', }, ) { subtest $test->{desc} => sub { @@ -330,6 +339,10 @@ for my $test ( $user->from_council( $test->{from_council} ); $user->update; + $report->discard_changes; + $report->council( $test->{report_council} ); + $report->update; + $mech->get_ok("/report/$report_id"); my $fields = $mech->visible_form_values( 'updateForm' ); if ( $test->{no_state} ) { @@ -340,6 +353,10 @@ for my $test ( }; } +$report->discard_changes; +$report->council( 2504 ); +$report->update; + # tidy up $mech->delete_user('test@example.com'); done_testing(); |