aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/auth.t
diff options
context:
space:
mode:
authorEdmund von der Burg <evdb@mysociety.org>2011-04-11 17:15:16 +0100
committerEdmund von der Burg <evdb@mysociety.org>2011-04-11 17:15:16 +0100
commit0786cbc17ad0d773c3fe125a43bd8b6e058a22dc (patch)
treeea4a47655b312575edca2b0ba9eb187894d644bf /t/app/controller/auth.t
parenteef4484ef6c9810dc2c174942bac0c0df13e640b (diff)
More robust tests
Diffstat (limited to 't/app/controller/auth.t')
-rw-r--r--t/app/controller/auth.t9
1 files changed, 4 insertions, 5 deletions
diff --git a/t/app/controller/auth.t b/t/app/controller/auth.t
index 78d3a5abf..9f08c8aa9 100644
--- a/t/app/controller/auth.t
+++ b/t/app/controller/auth.t
@@ -1,18 +1,18 @@
use strict;
use warnings;
-use Test::More tests => 94;
+use Test::More;
use FixMyStreet::TestMech;
my $mech = FixMyStreet::TestMech->new;
my $test_email = 'test@example.com';
my $test_password = 'foobar';
+$mech->delete_user($test_email);
END {
- ok( FixMyStreet::App->model('DB::User')->find( { email => $_ } )->delete,
- "delete test user '$_'" )
- for ($test_email);
+ $mech->delete_user($test_email);
+ done_testing();
}
$mech->get_ok('/auth');
@@ -224,4 +224,3 @@ $mech->content_contains( 'Email or password wrong', 'found error message' );
# more test:
# TODO: test that email are always lowercased
-