diff options
author | Struan Donald <struan@exo.org.uk> | 2012-09-05 17:03:50 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-09-05 17:03:50 +0100 |
commit | be0edc0f4ced36a82cf0733b32a81f27bd22f1d1 (patch) | |
tree | 625f616eac5cb691afc35856a2d967f1e4935875 /t/app/controller | |
parent | 70d64b6ab219c7c627b1bea3af49a1c98d803540 (diff) |
add non public status editing of contacts to admin
Diffstat (limited to 't/app/controller')
-rw-r--r-- | t/app/controller/admin.t | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t index 035dec39c..839bfd6b9 100644 --- a/t/app/controller/admin.t +++ b/t/app/controller/admin.t @@ -163,19 +163,32 @@ subtest 'check contact creation' => sub { $mech->get_ok('/admin/council_contacts/2650'); $mech->submit_form_ok( { with_fields => { - category => 'test category', - email => 'test@example.com', - note => 'test note', + category => 'test category', + email => 'test@example.com', + note => 'test note', + non_public => undef, } } ); $mech->content_contains( 'test category' ); $mech->content_contains( '<td>test@example.com' ); $mech->content_contains( '<td>test note' ); + $mech->content_contains( '<td>Public' ); + + $mech->submit_form_ok( { with_fields => { + category => 'private category', + email => 'test@example.com', + note => 'test note', + non_public => 'on', + } } ); + + $mech->content_contains( 'private category' ); + $mech->content_contains( '<td>Non Public' ); $mech->submit_form_ok( { with_fields => { category => 'test/category', email => 'test@example.com', note => 'test/note', + non_public => 'on', } } ); $mech->get_ok('/admin/council_edit/2650/test/category'); @@ -187,11 +200,21 @@ subtest 'check contact editing' => sub { $mech->submit_form_ok( { with_fields => { email => 'test2@example.com', note => 'test2 note', + non_public => undef, } } ); $mech->content_contains( 'test category' ); $mech->content_contains( '<td>test2@example.com' ); $mech->content_contains( '<td>test2 note' ); + $mech->content_contains( '<td>Public' ); + + $mech->submit_form_ok( { with_fields => { + email => 'test2@example.com', + note => 'test2 note', + non_public => 'on', + } } ); + + $mech->content_contains( '<td>Non Public' ); $mech->get_ok('/admin/council_edit/2650/test%20category'); $mech->content_contains( '<td><strong>test2@example.com' ); |