aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-09-05 16:56:20 +0100
committerStruan Donald <struan@exo.org.uk>2011-09-05 16:56:20 +0100
commitbc39723b98a0bb07cc8d57e99489e3a014d857ef (patch)
tree9fa42643ef9475758861d2592e5164f5747fe380
parent48507f44f28e9969089612e0e9bf530e2f7fb57e (diff)
fix failing test due to now having error messages in js elsewhere on the page
-rw-r--r--t/app/controller/auth.t12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/app/controller/auth.t b/t/app/controller/auth.t
index fef45ac90..efc5e60e6 100644
--- a/t/app/controller/auth.t
+++ b/t/app/controller/auth.t
@@ -24,16 +24,16 @@ $mech->not_logged_in_ok;
$mech->get_ok('/auth');
for my $test (
- [ '' => 'enter your email' ],
- [ 'not an email' => 'check your email address is correct' ],
- [ 'bob@foo' => 'check your email address is correct' ],
- [ 'bob@foonaoedudnueu.co.uk' => 'check your email address is correct' ],
+ [ '' => 'Please enter your email' ],
+ [ 'not an email' => 'Please check your email address is correct' ],
+ [ 'bob@foo' => 'Please check your email address is correct' ],
+ [ 'bob@foonaoedudnueu.co.uk' => 'Please check your email address is correct' ],
)
{
my ( $email, $error_message ) = @$test;
pass "--- testing bad email '$email' gives error '$error_message'";
$mech->get_ok('/auth');
- $mech->content_lacks($error_message);
+ is_deeply $mech->form_errors, [], 'no errors initially';
$mech->submit_form_ok(
{
form_name => 'general_auth',
@@ -43,7 +43,7 @@ for my $test (
"try to create an account with email '$email'"
);
is $mech->uri->path, '/auth', "still on auth page";
- $mech->content_contains($error_message);
+ is_deeply $mech->form_errors, [ $error_message ], 'no errors initially';
}
# create a new account