diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/Page.t | 25 | ||||
-rw-r--r-- | t/app/controller/auth.t | 2 | ||||
-rw-r--r-- | t/app/controller/contact.t | 16 |
3 files changed, 10 insertions, 33 deletions
@@ -11,7 +11,7 @@ use strict; use warnings; -use Test::More tests => 13; +use Test::More tests => 8; use Test::Exception; use FindBin; @@ -36,28 +36,6 @@ sub set_lang($) { mySociety::Locale::change(); } -sub test_geocode_string() { - my %params = (); - my $q = new MockQuery( 'nosite', \%params ); - - # geocode a straightforward string, expect success - my ( $latitude, $longitude, $error ) = - FixMyStreet::Geocode::string( 'Buckingham Palace', $q ); - is( $latitude, 51.4949261, 'example easting generated' ); - is( $longitude, -0.1461924, 'example northing generated' ); - is( $error, undef, 'should not generate error for simple example' ); - - # expect a failure message for Northern Ireland - ( $latitude, $longitude, $error ) = - FixMyStreet::Geocode::string( 'Falls Road, Belfast', $q ); - is( - $error, - "We do not cover Northern Ireland, I'm afraid, as our licence doesn't " - . "include any maps for the region.", - 'error message produced for NI location' - ); -} - sub test_header() { my $q = mock_query(); my $html; @@ -104,4 +82,3 @@ sub test_base_url_with_lang { ok(test_base_url_with_lang() == 1, 'Ran all tests for base_url_with_lang'); ok(test_footer() == 1, 'Ran all tests for the footer function'); ok(test_header() == 1, 'Ran all tests for the header function'); -ok(test_geocode_string() == 1, 'Ran all tests for the geocode_string function'); diff --git a/t/app/controller/auth.t b/t/app/controller/auth.t index 9f08c8aa9..9a466832b 100644 --- a/t/app/controller/auth.t +++ b/t/app/controller/auth.t @@ -24,7 +24,7 @@ $mech->not_logged_in_ok; $mech->get_ok('/auth'); for my $test ( - [ '' => 'enter an email address' ], + [ '' => 'enter your email' ], [ 'not an email' => 'check your email address is correct' ], [ 'bob@foo' => 'check your email address is correct' ], [ 'bob@foonaoedudnueu.co.uk' => 'check your email address is correct' ], diff --git a/t/app/controller/contact.t b/t/app/controller/contact.t index 9808ef762..bbb3a0f83 100644 --- a/t/app/controller/contact.t +++ b/t/app/controller/contact.t @@ -133,9 +133,9 @@ for my $test ( page_errors => [ 'There were problems with your report. Please see below.', ], field_errors => [ - 'Please give your name', - 'Please give your email', - 'Please give a subject', + 'Please enter your name', + 'Please enter your email', + 'Please enter a subject', 'Please write a message', ] }, @@ -149,9 +149,9 @@ for my $test ( page_errors => [ 'There were problems with your report. Please see below.', ], field_errors => [ - 'Please give your name', - 'Please give a valid email address', - 'Please give a subject', + 'Please enter your name', + 'Please enter a valid email address', + 'Please enter a subject', 'Please write a message', ] }, @@ -164,7 +164,7 @@ for my $test ( }, page_errors => [ 'There were problems with your report. Please see below.', ], - field_errors => [ 'Please give a subject', 'Please write a message', ] + field_errors => [ 'Please enter a subject', 'Please write a message', ] }, { fields => { @@ -186,7 +186,7 @@ for my $test ( }, page_errors => [ 'There were problems with your report. Please see below.', ], - field_errors => [ 'Please give a subject', 'Please write a message', ] + field_errors => [ 'Please enter a subject', 'Please write a message', ] }, { fields => { |