diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-04-20 16:04:57 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-07-13 09:42:50 +0100 |
commit | 02d06df3644d53aaa2611882491230fc28d843bd (patch) | |
tree | b2d884368b242dae61cfcab98c3b920ab24a1011 /t/app/controller/report_new_open311.t | |
parent | bd6ecb98fd3ad6f1602b0ea5593dea0bd96f8193 (diff) |
Have a whole fake mapit (for #182) that works if MAPIT_URL is set accordingly.
Setting MAPIT_URL to .../fakemapit/ will then return one area, ID 161 and
type ZZZ, whatever co-ordinate it is given. This means the default area
type is now ZZZ, the UK specific types are moved into the UK cobrands, and
the tests updated accordingly to still function (they assume UK-ness a lot,
so probably need an ALLOWED_COBRANDS entry of "fixmystreet: 'localhost'" and
for your host's domain to show fixmystreet too).
Diffstat (limited to 't/app/controller/report_new_open311.t')
-rw-r--r-- | t/app/controller/report_new_open311.t | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/t/app/controller/report_new_open311.t b/t/app/controller/report_new_open311.t index dc3583e6b..863571ad0 100644 --- a/t/app/controller/report_new_open311.t +++ b/t/app/controller/report_new_open311.t @@ -113,10 +113,10 @@ foreach my $test ( # submit initial pc form $mech->submit_form_ok( { with_fields => { pc => $test->{pc} } }, "submit location" ); - is_deeply $mech->form_errors, [], "no errors for pc '$test->{pc}'"; + is_deeply $mech->page_errors, [], "no errors for pc '$test->{pc}'"; # click through to the report page - $mech->follow_link_ok( { text => 'skip this step', }, + $mech->follow_link_ok( { text_regex => qr/skip this step/i, }, "follow 'skip this step' link" ); # submit the main form @@ -124,7 +124,7 @@ foreach my $test ( "submit form" ); # check that we got the errors expected - is_deeply $mech->form_errors, $test->{errors}, "check errors"; + is_deeply $mech->page_errors, $test->{errors}, "check errors"; # check that fields have changed as expected my $new_values = { @@ -136,7 +136,7 @@ foreach my $test ( if ( $test->{fields}->{category} eq 'Street lighting' ) { my $result = scraper { - process 'div#category_meta div select#form_type option', 'option[]' => '@value'; + process 'select#form_type option', 'option[]' => '@value'; } ->scrape( $mech->response ); |