aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorChris Mytton <self@hecticjeff.net>2013-09-03 16:49:54 +0100
committerChris Mytton <self@hecticjeff.net>2013-09-03 17:05:54 +0100
commit4f1d340588ead562a332993d88690518d0ac3886 (patch)
treed47ba0c292058cbe00768774ef696480d32aaa8f /t
parent85e407a413bdc71e21e25ccc206df9a3d666fa8f (diff)
[Zurich] Add test for superuser body editing
Diffstat (limited to 't')
-rw-r--r--t/cobrand/zurich.t7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t
index d61ec2ae0..87477b9f8 100644
--- a/t/cobrand/zurich.t
+++ b/t/cobrand/zurich.t
@@ -237,6 +237,13 @@ like $email->header('To'), qr/external_body\@example.org/, 'to line looks correc
like $email->body, qr/External Body/, 'body has right name';
like $email->body, qr/test\@example.com/, 'body does contain email address';
$mech->clear_emails_ok;
+$mech->log_out_ok;
+
+# Test only superuser can edit bodies
+$user = $mech->log_in_ok( 'dm1@example.org') ;
+$mech->get( '/admin/body/' . $zurich->id );
+is $mech->res->code, 404, "only superuser should be able to edit bodies";
+$mech->log_out_ok;
$mech->delete_problems_for_body( 2 );
$mech->delete_user( 'dm1@example.org' );