diff options
author | Struan Donald <struan@exo.org.uk> | 2019-12-04 09:50:28 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2019-12-04 09:50:28 +0000 |
commit | 9ca53c995ec010524e32cb76cd5e3f8725e9f423 (patch) | |
tree | 2ec6872670f0f168acc5a243bac94bbcc6bdfe1b /t/app/controller | |
parent | 4576997254c7dc857fa04e186905fcd5850b20c9 (diff) | |
parent | 26119d763cafb8c80541633a0f7548a8d9e3a906 (diff) |
Merge branch 'issues/freshdesk/102-peterborough-title-limit'
Diffstat (limited to 't/app/controller')
-rw-r--r-- | t/app/controller/report_new.t | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t index 650defb70..e3126c7e1 100644 --- a/t/app/controller/report_new.t +++ b/t/app/controller/report_new.t @@ -59,6 +59,7 @@ for my $body ( { area_id => 2600, name => 'Rutland County Council' }, { area_id => 2234, name => 'Northamptonshire County Council' }, { area_id => 2483, name => 'Hounslow Borough Council' }, + { area_id => 2566, name => 'Peterborough City Council' }, ) { my $body_obj = $mech->create_body_ok($body->{area_id}, $body->{name}); push @bodies, $body_obj; @@ -157,6 +158,11 @@ my $contact18 = $mech->create_contact_ok( email => 'general-enquiry-2483@example.com', non_public => 1, ); +my $contact19 = $mech->create_contact_ok( + body_id => $body_ids{2566}, # Peterborough + category => 'Trees', + email => 'trees-2566@example.com', +); # test that the various bit of form get filled in and errors correctly # generated. @@ -681,6 +687,26 @@ foreach my $test ( changes => { }, errors => [ 'Summaries are limited to 120 characters in length. Please shorten your summary', 'Please enter some details'], }, + { + msg => 'Peterborough validation', + pc => 'PE1 1HF', + fields => { + title => 'This is a very long title that should fail the validation', + detail => '', + photo1 => '', + photo2 => '', + photo3 => '', + name => 'A User', + may_show_name => '1', + username => 'user@example.org', + phone => '', + category => 'Trees', + password_sign_in => '', + password_register => '', + }, + changes => { }, + errors => [ 'Summaries are limited to 50 characters in length. Please shorten your summary', 'Please enter some details'], + }, ) { subtest "check form errors where $test->{msg}" => sub { @@ -688,7 +714,7 @@ foreach my $test ( # submit initial pc form FixMyStreet::override_config { - ALLOWED_COBRANDS => [ { fixmystreet => '.' }, 'bromley', 'oxfordshire', 'rutland', 'lincolnshire', 'buckinghamshire', 'northamptonshire' ], + ALLOWED_COBRANDS => [ { fixmystreet => '.' }, 'bromley', 'oxfordshire', 'rutland', 'lincolnshire', 'buckinghamshire', 'northamptonshire', 'peterborough' ], MAPIT_URL => 'http://mapit.uk/', }, sub { $mech->submit_form_ok( { with_fields => { pc => $test->{pc} } }, |