aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2017-04-07 14:07:08 +0100
committerDave Arter <davea@mysociety.org>2017-04-10 14:21:54 +0100
commit430f17de7b4af94e52152bf11a30bd423a7a1c34 (patch)
tree1a59ed076561b34d8c018bc845a0183f4b64f3a4 /t/app/controller
parent880acad342b69720fe7acd54e0e7cede7036e4c7 (diff)
Allow comma-separated contact emails in the admin
The report-sending code has allowed multiple emails for a long time, but the admin wouldn't allow you to enter multiple emails for each contact. Fixes mysociety/FixMyStreet-Commercial#835
Diffstat (limited to 't/app/controller')
-rw-r--r--t/app/controller/admin.t15
1 files changed, 13 insertions, 2 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t
index 2fdd8b74a..5f8abe5a6 100644
--- a/t/app/controller/admin.t
+++ b/t/app/controller/admin.t
@@ -206,7 +206,7 @@ subtest 'check contact creation' => sub {
subtest 'check contact editing' => sub {
$mech->get_ok('/admin/body/' . $body->id .'/test%20category');
- $mech->submit_form_ok( { with_fields => {
+ $mech->submit_form_ok( { with_fields => {
email => 'test2@example.com',
note => 'test2 note',
non_public => undef,
@@ -218,7 +218,18 @@ subtest 'check contact editing' => sub {
$mech->content_contains( 'Private:&nbsp;No' );
$mech->get_ok('/admin/body/' . $body->id . '/test%20category');
- $mech->submit_form_ok( { with_fields => {
+ $mech->submit_form_ok( { with_fields => {
+ email => 'test2@example.com, test3@example.com',
+ note => 'test3 note',
+ } } );
+
+ $mech->content_contains( 'test2@example.com,test3@example.com' );
+
+ $mech->get_ok('/admin/body/' . $body->id . '/test%20category');
+ $mech->content_contains( '<td><strong>test2@example.com,test3@example.com' );
+
+ $mech->get_ok('/admin/body/' . $body->id . '/test%20category');
+ $mech->submit_form_ok( { with_fields => {
email => 'test2@example.com',
note => 'test2 note',
non_public => 'on',