aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-02-01 16:50:24 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-02-04 06:53:31 +0000
commitee2f7deae13627d484decd2a8c92ec43f9712a44 (patch)
treede0d88f4357e6ab570e23e7c1a4150a8ed51a2a7 /t
parentf88024fb4dc9b549bab0abacf207bd7b297652a2 (diff)
Improve tests running together a bit.
Diffstat (limited to 't')
-rw-r--r--t/cobrand/closest.t4
-rw-r--r--t/cobrand/zurich.t4
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 );