diff options
author | Hakim Cassimally <hakim@mysociety.org> | 2013-12-11 15:21:10 +0000 |
---|---|---|
committer | Hakim Cassimally <hakim@mysociety.org> | 2013-12-23 16:13:27 +0000 |
commit | f6b9e9ee08db4211e69df28957c3f4a770bd1d57 (patch) | |
tree | 2e0a55a72fc4afece81462fb702436183b6d79b8 /t/cobrand | |
parent | 1c864eee5d36fd71910aaac6bae9191e2c131f17 (diff) |
[Zurich] don't hardcode division ID in cleanup()
Diffstat (limited to 't/cobrand')
-rw-r--r-- | t/cobrand/zurich.t | 17 |
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! |