aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorChris Mytton <self@hecticjeff.net>2013-09-12 09:49:39 +0100
committerChris Mytton <self@hecticjeff.net>2013-09-12 09:49:39 +0100
commit668e85086b7bfdf4a0ec99a2bd9d06476e7eb9e6 (patch)
tree1439a24308aa06d09cc932fd8eb7d9875d1ed71a /t
parent7fffbf2e562d9ede840c09f70e5495ac79890e4b (diff)
parent9727f3849c998216eb29ed2a7cbe78c85951e4b8 (diff)
Merge branch 'zurich-mandatory-telephone-number'
Diffstat (limited to 't')
-rw-r--r--t/cobrand/zurich.t11
1 files changed, 9 insertions, 2 deletions
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t
index 721e6517a..69cf82db9 100644
--- a/t/cobrand/zurich.t
+++ b/t/cobrand/zurich.t
@@ -240,17 +240,24 @@ $mech->clear_emails_ok;
$mech->log_out_ok;
# Test only superuser can edit bodies
-$user = $mech->log_in_ok( 'dm1@example.org') ;
+$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;
# Test only superuser can see "Add body" form
-$user = $mech->log_in_ok( 'dm1@example.org') ;
+$user = $mech->log_in_ok( 'dm1@example.org' );
$mech->get_ok( '/admin/bodies' );
$mech->content_lacks( '<form method="post" action="bodies"' );
$mech->log_out_ok;
+# Test phone number is mandatory
+$user = $mech->log_in_ok( 'dm1@example.org' );
+$mech->get_ok( '/report/new?latitude=51.500802;longitude=-0.143005' );
+$mech->submit_form( with_fields => { phone => "" } );
+$mech->content_contains( 'Diese Information wird ben&ouml;tigt' );
+$mech->log_out_ok;
+
$mech->delete_problems_for_body( 2 );
$mech->delete_user( 'dm1@example.org' );
$mech->delete_user( 'sdm1@example.org' );