aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorChris Mytton <self@hecticjeff.net>2013-09-11 14:32:17 +0100
committerChris Mytton <self@hecticjeff.net>2013-09-11 14:32:17 +0100
commitca4487b3b161b857ef5412f93ecd60646697ff2d (patch)
tree30e9f87685c10864d9cbfd45e4fa7c61f70f5f1b /t
parent9ead5a166830715e149a2ec2c2c064331a6f48ae (diff)
[Zurich] Test deleted bodies can't have problems assigned
Diffstat (limited to 't')
-rw-r--r--t/cobrand/zurich.t14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t
index 721e6517a..be94d4112 100644
--- a/t/cobrand/zurich.t
+++ b/t/cobrand/zurich.t
@@ -251,6 +251,20 @@ $mech->get_ok( '/admin/bodies' );
$mech->content_lacks( '<form method="post" action="bodies"' );
$mech->log_out_ok;
+# Test problems can't be assigned to deleted bodies
+$user = $mech->log_in_ok( 'dm1@example.org' );
+$user->from_body( 1 );
+$user->update;
+$report->state( 'confirmed' );
+$report->update;
+$mech->get_ok( '/admin/body/' . $external_body->id );
+$mech->submit_form_ok( { with_fields => { deleted => 1 } } );
+$mech->get_ok( '/admin/report_edit/' . $report->id );
+$mech->content_lacks( $external_body->name );
+$user->from_body( 2 );
+$user->update;
+$mech->log_out_ok;
+
$mech->delete_problems_for_body( 2 );
$mech->delete_user( 'dm1@example.org' );
$mech->delete_user( 'sdm1@example.org' );