aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand/zurich.t
diff options
context:
space:
mode:
Diffstat (limited to 't/cobrand/zurich.t')
-rw-r--r--t/cobrand/zurich.t17
1 files changed, 9 insertions, 8 deletions
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t
index 86bfcccea..a4f3963c6 100644
--- a/t/cobrand/zurich.t
+++ b/t/cobrand/zurich.t
@@ -43,14 +43,6 @@ sub reset_report_state {
use FixMyStreet::TestMech;
my $mech = FixMyStreet::TestMech->new;
-sub cleanup {
- $mech->delete_problems_for_body( 2 );
- $mech->delete_user( 'dm1@example.org' );
- $mech->delete_user( 'sdm1@example.org' );
-}
-
-cleanup();
-
# Front page test
ok $mech->host("zurich.example.com"), "change host to Zurich";
FixMyStreet::override_config {
@@ -79,6 +71,15 @@ $external_body->send_method( 'Zurich' );
$external_body->endpoint( 'external_body@example.org' );
$external_body->update;
+sub cleanup {
+ $mech->delete_problems_for_body( $division->id );
+ $mech->delete_problems_for_body( $subdivision->id );
+ $mech->delete_user( 'dm1@example.org' );
+ $mech->delete_user( 'sdm1@example.org' );
+}
+
+cleanup();
+
subtest "set up superuser" => sub {
my $superuser = $mech->log_in_ok( 'super@example.org' );
# a user from body $zurich is a superuser, as $zurich has no parent id!