diff options
author | Struan Donald <struan@exo.org.uk> | 2011-06-27 09:18:18 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-06-27 09:18:18 +0100 |
commit | b483a17c13ba8e273949ce4ee8c8c05e66b06647 (patch) | |
tree | 3e928fa68c3edb90c0666ec52ad8c9982f9dab77 /t/app/controller/auth.t | |
parent | 8deb709fa2d44bcbaba54734f7f4f4385980d8df (diff) | |
parent | 62ffebc89cc66d32a828ea1de8c850c3e950faa1 (diff) |
Merge branch 'master' of ssh://git.mysociety.org/data/git/public/fixmystreet into new_statuses
Conflicts:
perllib/FixMyStreet/DB/Result/Comment.pm
perllib/FixMyStreet/DB/Result/User.pm
web/css/core.css
Diffstat (limited to 't/app/controller/auth.t')
-rw-r--r-- | t/app/controller/auth.t | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/t/app/controller/auth.t b/t/app/controller/auth.t index 79db69704..8fbc413ec 100644 --- a/t/app/controller/auth.t +++ b/t/app/controller/auth.t @@ -38,7 +38,7 @@ for my $test ( { form_name => 'general_auth', fields => { email => $email, }, - button => 'email_login', + button => 'email_sign_in', }, "try to create an account with email '$email'" ); @@ -53,7 +53,7 @@ $mech->submit_form_ok( { form_name => 'general_auth', fields => { email => $test_email, }, - button => 'email_login', + button => 'email_sign_in', }, "create an account for '$test_email'" ); @@ -100,7 +100,7 @@ $mech->not_logged_in_ok; $mech->not_logged_in_ok; } -# get a login email and change password +# get a sign in email and change password { $mech->clear_emails_ok; $mech->get_ok('/auth'); @@ -111,9 +111,9 @@ $mech->not_logged_in_ok; email => "$test_email", r => 'faq', # Just as a test }, - button => 'email_login', + button => 'email_sign_in', }, - "email_login with '$test_email'" + "email_sign_in with '$test_email'" ); # rest is as before so no need to test @@ -182,19 +182,19 @@ $mech->not_logged_in_ok; } foreach my $remember_me ( '1', '0' ) { - subtest "login using valid details (remember_me => '$remember_me')" => sub { + subtest "sign in using valid details (remember_me => '$remember_me')" => sub { $mech->get_ok('/auth'); $mech->submit_form_ok( { form_name => 'general_auth', fields => { email => $test_email, - password => $test_password, + password_sign_in => $test_password, remember_me => ( $remember_me ? 1 : undef ), }, - button => 'login', + button => 'sign_in', }, - "login with '$test_email' & '$test_password" + "sign in with '$test_email' & '$test_password" ); is $mech->uri->path, '/my', "redirected to correct page"; @@ -210,18 +210,18 @@ foreach my $remember_me ( '1', '0' ) { }; } -# try to login with bad details +# try to sign in with bad details $mech->get_ok('/auth'); $mech->submit_form_ok( { form_name => 'general_auth', fields => { email => $test_email, - password => 'not the password', + password_sign_in => 'not the password', }, - button => 'login', + button => 'sign_in', }, - "login with '$test_email' & '$test_password" + "sign in with '$test_email' & '$test_password" ); is $mech->uri->path, '/auth', "redirected to correct page"; $mech->content_contains( 'Email or password wrong', 'found error message' ); |