aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/report_new_open311.t
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-08-04 17:23:07 +0100
committerStruan Donald <struan@exo.org.uk>2011-08-04 17:23:07 +0100
commitc721134411970bbd987857e68d04f6810ba86b71 (patch)
tree7db6ef42ee16f4508146a8a61500ace3e0b63a17 /t/app/controller/report_new_open311.t
parentc501ad1db1f5861a482e8c973ddf868447f3c1c7 (diff)
check that the generated select has all the elements we expect
Diffstat (limited to 't/app/controller/report_new_open311.t')
-rw-r--r--t/app/controller/report_new_open311.t9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/app/controller/report_new_open311.t b/t/app/controller/report_new_open311.t
index 0c000e2ca..dc3583e6b 100644
--- a/t/app/controller/report_new_open311.t
+++ b/t/app/controller/report_new_open311.t
@@ -134,6 +134,15 @@ foreach my $test (
is_deeply $mech->visible_form_values, $new_values,
"values correctly changed";
+ if ( $test->{fields}->{category} eq 'Street lighting' ) {
+ my $result = scraper {
+ process 'div#category_meta div select#form_type option', 'option[]' => '@value';
+ }
+ ->scrape( $mech->response );
+
+ is_deeply $result->{option}, [ qw/old modern/], 'displayed streetlight type select';
+ }
+
$new_values = {
%{ $test->{fields} },
%{ $test->{submit_with} },