diff options
-rw-r--r-- | t/cobrand/closest.t | 4 | ||||
-rw-r--r-- | t/cobrand/zurich.t | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/t/cobrand/closest.t b/t/cobrand/closest.t index ab97694c9..d06f7e9a0 100644 --- a/t/cobrand/closest.t +++ b/t/cobrand/closest.t @@ -5,6 +5,9 @@ use Test::More; use mySociety::Locale; use FixMyStreet::App; +use FixMyStreet::TestMech; + +my $mech = FixMyStreet::TestMech->new; use_ok 'FixMyStreet::Cobrand'; @@ -81,4 +84,5 @@ SKIP: { } # all done +$mech->delete_user( $user ); done_testing(); diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t index a6922a00d..686be1e79 100644 --- a/t/cobrand/zurich.t +++ b/t/cobrand/zurich.t @@ -22,10 +22,12 @@ $mech->content_like( qr/zurich/i ); my $zurich = $mech->create_body_ok( 1, 'Zurich' ); my $division = $mech->create_body_ok( 2, 'Division 1' ); $division->parent( $zurich->id ); +$division->send_method( 'Zurich' ); $division->endpoint( 'division@example.org' ); $division->update; my $subdivision = $mech->create_body_ok( 3, 'Subdivision A' ); $subdivision->parent( $division->id ); +$subdivision->send_method( 'Zurich' ); $subdivision->endpoint( 'subdivision@example.org' ); $subdivision->update; @@ -44,6 +46,8 @@ $mech->get_ok( '/admin' ); is $mech->uri->path, '/auth', "got sent to the sign in page"; my $user = $mech->log_in_ok( 'dm1@example.org') ; +$user->from_body( undef ); +$user->update; $mech->get_ok( '/admin' ); is $mech->uri->path, '/auth', "got sent to the sign in page"; $user->from_body( 2 ); |