diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-12-18 16:39:21 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-12-19 14:43:26 +0000 |
commit | 3e30cee562d3eae98d73e63dc2d9708b09e24e81 (patch) | |
tree | d9f8249092d189eb4beee360dbebf3588acf5cbc /t | |
parent | 3ce8e191fdd1f41555b353d589cb6a4a5ef1b38d (diff) |
Fix missed variable name change, and accompanying test.
Diffstat (limited to 't')
-rw-r--r-- | t/app/controller/report_new.t | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t index f6a7b0824..783f3fb01 100644 --- a/t/app/controller/report_new.t +++ b/t/app/controller/report_new.t @@ -104,6 +104,57 @@ ok $contact7, "created test contact 7"; foreach my $test ( { msg => 'all fields empty', + pc => 'OX1 3DH', + fields => { + title => '', + detail => '', + photo => '', + name => '', + may_show_name => '1', + email => '', + phone => '', + password_sign_in => '', + password_register => '', + remember_me => undef, + }, + changes => {}, + errors => [ + 'Please enter a subject', + 'Please enter some details', + # No category error, as no categories for Oxon at all, so is skipped + 'Please enter your email', + 'Please enter your name', + ], + }, + { + msg => 'all fields empty, bad category', + pc => 'GL50 2PR', + fields => { + title => '', + detail => '', + photo => '', + name => '', + may_show_name => '1', + email => '', + phone => '', + category => 'Something bad', + password_sign_in => '', + password_register => '', + remember_me => undef, + }, + changes => { + category => '-- Pick a category --', + }, + errors => [ + 'Please enter a subject', + 'Please enter some details', + 'Please choose a category', + 'Please enter your email', + 'Please enter your name', + ], + }, + { + msg => 'all fields empty except category', pc => 'SW1A 1AA', fields => { title => '', |