aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/auth.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-21 17:46:22 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-21 17:46:22 +0100
commit62887757a6b8a94047911a90b44e6bf12776b08d (patch)
tree7f6c951a177c64c2d784ceb4e5fc6422b41457de /t/app/controller/auth.t
parentd7d612b07c9d34985bb18410bcff1425c3eb2626 (diff)
Implement redirect upon sign in to where the user came from; tidy up error display.
Diffstat (limited to 't/app/controller/auth.t')
-rw-r--r--t/app/controller/auth.t9
1 files changed, 6 insertions, 3 deletions
diff --git a/t/app/controller/auth.t b/t/app/controller/auth.t
index a44716a1e..79db69704 100644
--- a/t/app/controller/auth.t
+++ b/t/app/controller/auth.t
@@ -57,7 +57,6 @@ $mech->submit_form_ok(
},
"create an account for '$test_email'"
);
-is $mech->uri->path, '/auth/token', "redirected to welcome page";
# check that we are not logged in yet
$mech->not_logged_in_ok;
@@ -108,12 +107,14 @@ $mech->not_logged_in_ok;
$mech->submit_form_ok(
{
form_name => 'general_auth',
- fields => { email => "$test_email", },
+ fields => {
+ email => "$test_email",
+ r => 'faq', # Just as a test
+ },
button => 'email_login',
},
"email_login with '$test_email'"
);
- is $mech->uri->path, '/auth/token', "redirected to token page";
# rest is as before so no need to test
@@ -125,7 +126,9 @@ $mech->not_logged_in_ok;
$mech->clear_emails_ok;
my ($link) = $email->body =~ m{(http://\S+)};
$mech->get_ok($link);
+ is $mech->uri->path, '/faq', "redirected to the Help page";
+ $mech->get_ok('/my');
$mech->follow_link_ok( { url => '/auth/change_password' } );
ok my $form = $mech->form_name('change_password'),