aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/report_new.t
diff options
context:
space:
mode:
Diffstat (limited to 't/app/controller/report_new.t')
-rw-r--r--t/app/controller/report_new.t45
1 files changed, 2 insertions, 43 deletions
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t
index 133dc8047..b796578a0 100644
--- a/t/app/controller/report_new.t
+++ b/t/app/controller/report_new.t
@@ -144,11 +144,9 @@ foreach my $test (
name => '',
may_show_name => '1',
username => '',
- email => '',
phone => '',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => {},
errors => [
@@ -171,12 +169,10 @@ foreach my $test (
name => '',
may_show_name => '1',
username => '',
- email => '',
phone => '',
category => 'Something bad',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => {
category => '-- Pick a category --',
@@ -201,12 +197,10 @@ foreach my $test (
name => '',
may_show_name => '1',
username => '',
- email => '',
phone => '',
category => 'Street lighting',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => {},
errors => [
@@ -228,12 +222,10 @@ foreach my $test (
name => '',
may_show_name => undef,
username => '',
- email => '',
phone => '',
category => 'Street lighting',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => {},
errors => [
@@ -255,12 +247,10 @@ foreach my $test (
name => 'Bob Jones',
may_show_name => undef,
username => '',
- email => '',
phone => '',
category => 'Street lighting',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => {},
errors => [
@@ -281,12 +271,10 @@ foreach my $test (
name => 'Bob Jones',
may_show_name => '1',
username => '',
- email => '',
phone => '',
category => 'Street lighting',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => {},
errors => [
@@ -307,12 +295,10 @@ foreach my $test (
name => 'Bob Jones',
may_show_name => '1',
username => '',
- email => '',
phone => '',
category => 'Street lighting',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => {
title => 'Dog poo on walls',
@@ -333,12 +319,10 @@ foreach my $test (
name => 'DUDE',
may_show_name => '1',
username => '',
- email => '',
phone => '',
category => 'Street lighting',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => {},
errors => [
@@ -358,12 +342,10 @@ foreach my $test (
name => 'anonymous',
may_show_name => '1',
username => '',
- email => '',
phone => '',
category => 'Street lighting',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => {},
errors => [
@@ -383,14 +365,12 @@ foreach my $test (
name => 'Joe Smith',
may_show_name => '1',
username => 'not an email',
- email => '',
phone => '',
category => 'Street lighting',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
- changes => { username => 'notanemail', email => 'notanemail' },
+ changes => { username => 'notanemail' },
errors => [ 'Please enter a valid email', ],
},
{
@@ -405,12 +385,10 @@ foreach my $test (
name => '',
may_show_name => '1',
username => '',
- email => '',
phone => '',
category => 'Street lighting',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => {
title => 'Test title',
@@ -433,17 +411,14 @@ foreach my $test (
name => ' Bob Jones ',
may_show_name => '1',
username => ' BOB @ExAmplE.COM ',
- email => '',
phone => '',
category => 'Street lighting',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => {
name => 'Bob Jones',
username => 'bob@example.com',
- email => 'bob@example.com',
},
errors => [ 'Please enter a subject', 'Please enter some details', ],
},
@@ -459,12 +434,10 @@ foreach my $test (
name => 'Bob Jones',
may_show_name => '1',
username => 'bob@example.com',
- email => 'bob@example.com',
phone => '',
category => 'Street lighting',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => {
photo1 => '',
@@ -483,12 +456,10 @@ foreach my $test (
name => 'Bob Jones',
may_show_name => '1',
username => 'bob@example.com',
- email => 'bob@example.com',
phone => '',
category => 'Street lighting',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => {
photo1 => '',
@@ -507,12 +478,10 @@ foreach my $test (
name => 'Bob Jones',
may_show_name => '1',
username => 'bob@example.com',
- email => 'bob@example.com',
phone => '',
category => 'Street lighting',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => {
photo1 => '',
@@ -532,12 +501,10 @@ foreach my $test (
name => 'Bob Example',
may_show_name => '1',
username => 'bob@example.com',
- email => 'bob@example.com',
phone => '',
category => 'Trees',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => { },
errors => [ 'Please enter a subject', 'Reports are limited to 1750 characters in length. Please shorten your report' ],
@@ -554,12 +521,10 @@ foreach my $test (
name => 'Bob Example',
may_show_name => '1',
username => 'bob@example.com',
- email => 'bob@example.com',
phone => '',
category => 'Trees',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => { },
errors => [ 'Please enter a subject', 'Reports are limited to 1700 characters in length. Please shorten your report' ],
@@ -576,12 +541,10 @@ foreach my $test (
name => 'Bob Example',
may_show_name => '1',
username => 'bob@example.com',
- email => 'bob@example.com',
phone => '123456789 12345678910',
category => 'Trees',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => { },
errors => [ 'Please enter a subject', 'Phone numbers are limited to 20 characters in length.' ],
@@ -598,12 +561,10 @@ foreach my $test (
name => 'This is a very long name that should fail validation',
may_show_name => '1',
username => 'bob@example.com',
- email => 'bob@example.com',
phone => '',
category => 'Street lighting',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => { },
errors => [ 'Please enter a subject', 'Please enter some details', 'Names are limited to 50 characters in length.' ],
@@ -620,12 +581,10 @@ foreach my $test (
name => 'This is a very long name that should fail validation',
may_show_name => '1',
username => 'bob@example.com',
- email => 'bob@example.com',
phone => '',
category => 'Trees',
password_sign_in => '',
password_register => '',
- remember_me => undef,
},
changes => { },
errors => [ 'Please enter a subject', 'Please enter some details', 'Names are limited to 40 characters in length.' ],
@@ -1360,7 +1319,7 @@ subtest "check map click ajax response" => sub {
};
ok $extra_details->{titles_list}, 'Bromley sends back list of titles';
like $extra_details->{councils_text}, qr/Bromley Council/, 'correct council text';
- like $extra_details->{councils_text_private}, qr/^These will be sent to the council, but will never be shown online/, 'correct private council text';
+ like $extra_details->{councils_text_private}, qr/^These details will be sent to the council, but will never be shown online/, 'correct private council text';
like $extra_details->{category}, qr/Trees/, 'category looks correct';
is_deeply $extra_details->{bodies}, [ "Bromley Council" ], 'correct bodies';
ok !$extra_details->{contribute_as}, 'no contribute as section';