aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2019-08-06 21:49:34 +0100
committerDave Arter <davea@mysociety.org>2019-08-16 16:16:53 +0100
commit66a5779a9856bd0cd25a77666f99bc86dd4a8041 (patch)
tree2b99bf81af9735967013219a523b2fd44c20c1f3 /t/app/controller
parentbc05c15122a8032866fdb53d285d99b3e48b3e28 (diff)
Allow OIDC auth to provide its own ‘change password’ URI
Diffstat (limited to 't/app/controller')
-rw-r--r--t/app/controller/auth_social.t5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/app/controller/auth_social.t b/t/app/controller/auth_social.t
index 160d46f8f..80b700e29 100644
--- a/t/app/controller/auth_social.t
+++ b/t/app/controller/auth_social.t
@@ -65,6 +65,7 @@ for my $test (
auth_uri => 'http://oidc.example.org/oauth2/v2.0/authorize',
token_uri => 'http://oidc.example.org/oauth2/v2.0/token',
logout_uri => 'http://oidc.example.org/oauth2/v2.0/logout',
+ password_change_uri => 'http://oidc.example.org/oauth2/v2.0/password_change',
display_name => 'MyWestminster'
}
}
@@ -79,6 +80,7 @@ for my $test (
success_callback => '/auth/OIDC?code=response-code&state=login',
redirect_pattern => qr{oidc\.example\.org/oauth2/v2\.0/authorize},
logout_redirect_pattern => qr{oidc\.example\.org/oauth2/v2\.0/logout},
+ password_change_pattern => qr{oidc\.example\.org/oauth2/v2\.0/password_change},
user_extras => [
[westminster_account_id => "1c304134-ef12-c128-9212-123908123901"],
],
@@ -241,6 +243,9 @@ for my $state ( 'refused', 'no email', 'existing UID', 'okay' ) {
$mech->content_contains( $report->title );
$mech->content_contains( "/report/$report_id" );
}
+ if ($test->{type} eq 'oidc') {
+ ok $mech->find_link( text => 'Change password', url_regex => $test->{password_change_pattern} );
+ }
}
$mech->get('/auth/sign_out');