diff options
author | Struan Donald <struan@exo.org.uk> | 2012-08-22 10:57:10 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-08-22 10:57:10 +0100 |
commit | 2e0a4e8ec45579e4e5c9cf8aa123d5ab215b9703 (patch) | |
tree | c13e3c59b686e01460dc7960547f7e9c53c288bd /t/app/controller/contact.t | |
parent | b99c5ff97b29a27eeba52ed24385ac30388e875c (diff) | |
parent | 88a7d38dffa3dabdf0f85573b254cea9c8ab232b (diff) |
Merge remote-tracking branch 'origin/master' into fmb-read-only
Conflicts:
.gitignore
bin/make_css
conf/general.yml-example
perllib/FixMyStreet/App/Controller/Council.pm
perllib/FixMyStreet/App/Controller/Report/New.pm
perllib/FixMyStreet/Cobrand/Default.pm
templates/web/default/around/around_index.html
templates/web/default/index.html
templates/web/emptyhomes/index.html
templates/web/fixmystreet/around/around_index.html
templates/web/fixmystreet/index.html
web/fixmystreet_app_cgi.cgi
web/fixmystreet_app_fastcgi.cgi
Diffstat (limited to 't/app/controller/contact.t')
-rw-r--r-- | t/app/controller/contact.t | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/t/app/controller/contact.t b/t/app/controller/contact.t index 970241d12..11e0d30cf 100644 --- a/t/app/controller/contact.t +++ b/t/app/controller/contact.t @@ -131,8 +131,7 @@ for my $test ( message => '', }, page_errors => - [ 'There were problems with your report. Please see below.', ], - field_errors => [ + [ 'There were problems with your report. Please see below.', 'Please enter your name', 'Please enter your email', 'Please enter a subject', @@ -147,8 +146,7 @@ for my $test ( message => '', }, page_errors => - [ 'There were problems with your report. Please see below.', ], - field_errors => [ + [ 'There were problems with your report. Please see below.', 'Please enter your name', 'Please enter a valid email address', 'Please enter a subject', @@ -162,9 +160,10 @@ for my $test ( subject => '', message => '', }, - page_errors => - [ 'There were problems with your report. Please see below.', ], - field_errors => [ 'Please enter a subject', 'Please write a message', ] + page_errors => [ + 'There were problems with your report. Please see below.', + 'Please enter a subject', 'Please write a message', + ] }, { fields => { @@ -173,9 +172,10 @@ for my $test ( subject => 'A subject', message => '', }, - page_errors => - [ 'There were problems with your report. Please see below.', ], - field_errors => [ 'Please write a message', ] + page_errors => [ + 'There were problems with your report. Please see below.', + 'Please write a message', + ] }, { fields => { @@ -184,9 +184,11 @@ for my $test ( subject => ' ', message => '', }, - page_errors => - [ 'There were problems with your report. Please see below.', ], - field_errors => [ 'Please enter a subject', 'Please write a message', ] + page_errors => [ + 'There were problems with your report. Please see below.', + 'Please enter a subject', + 'Please write a message', + ] }, { fields => { @@ -195,9 +197,10 @@ for my $test ( subject => 'A subject', message => ' ', }, - page_errors => - [ 'There were problems with your report. Please see below.', ], - field_errors => [ 'Please write a message', ] + page_errors => [ + 'There were problems with your report. Please see below.', + 'Please write a message', + ] }, { url => '/contact?id=' . $problem_main->id, @@ -209,7 +212,6 @@ for my $test ( id => 'invalid', }, page_errors => [ 'Illegal ID' ], - field_errors => [] }, ) { @@ -217,7 +219,6 @@ for my $test ( $mech->get_ok( $test->{url} ? $test->{url} : '/contact' ); $mech->submit_form_ok( { with_fields => $test->{fields} } ); is_deeply $mech->page_errors, $test->{page_errors}, 'page errors'; - is_deeply $mech->form_errors, $test->{field_errors}, 'field_errors'; # we santise this when we submit so need to remove it delete $test->{fields}->{id} |