diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-06-26 18:41:44 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-09-30 11:12:19 +0100 |
commit | 369d00d830ede582295f092e221379fa671c7cf5 (patch) | |
tree | 6c2396003d897c71b5da3222bc1073e9cbdf2959 /t/cobrand | |
parent | 217cd97453bb8437983b7ad36ff72524761c1736 (diff) |
[Zurich] Allow external body to link to a category
Diffstat (limited to 't/cobrand')
-rw-r--r-- | t/cobrand/zurich.t | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t index fbdcc3236..60ccfde14 100644 --- a/t/cobrand/zurich.t +++ b/t/cobrand/zurich.t @@ -745,6 +745,22 @@ subtest "phone number is not mandatory for reports from mobile apps" => sub { $mech->clear_emails_ok; }; +subtest "link external body to category" => sub { + $mech->log_in_ok( 'super@example.org' ); + $mech->get_ok( '/admin/body/' . $zurich->id ); + $mech->content_lacks('extra[category]'); + $mech->get_ok( '/admin/body/' . $division->id ); + $mech->content_lacks('extra[category]'); + $mech->get_ok( '/admin/body/' . $subdivision->id ); + $mech->content_lacks('extra[category]'); + $mech->get_ok( '/admin/body/' . $external_body->id ); + $mech->content_contains('extra[category]'); + $mech->submit_form_ok({ with_fields => { 'extra[category]' => 'Cat1' } }); + $mech->content_contains('<option value="Cat1" selected>'); + $external_body->discard_changes; + is $external_body->get_extra_metadata('category'), 'Cat1'; +}; + subtest "problems can't be assigned to deleted bodies" => sub { $user = $mech->log_in_ok( 'dm1@example.org' ); $user->from_body( $zurich->id ); |