aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/auth.t
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-11-21 11:34:21 +0000
committerStruan Donald <struan@exo.org.uk>2011-11-21 11:34:21 +0000
commit139dcd145951cb24b9617ab7587ff40e9fd77abe (patch)
tree96618550936089a62085a4df82168efc3e45be6d /t/app/controller/auth.t
parent44091a00e14828f4fff918f9dbdfadef4c04ec11 (diff)
parenta56fa32e9165e562bb4cfddf3cfa100649618bed (diff)
Merge branch 'js-validation'
Diffstat (limited to 't/app/controller/auth.t')
-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