diff options
Diffstat (limited to 't')
-rw-r--r-- | t/Mock/OpenIDConnect.pm | 1 | ||||
-rw-r--r-- | t/app/controller/auth_social.t | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/t/Mock/OpenIDConnect.pm b/t/Mock/OpenIDConnect.pm index 3fb15ff70..77ed88817 100644 --- a/t/Mock/OpenIDConnect.pm +++ b/t/Mock/OpenIDConnect.pm @@ -48,6 +48,7 @@ sub dispatch_request { family_name => "Dwyer", tfp => "B2C_1_default", extension_CrmContactId => "1c304134-ef12-c128-9212-123908123901", + nonce => 'MyAwesomeRandomValue', }; $payload->{emails} = ['oidc@example.org'] if $self->returns_email; my $signature = "dummy"; diff --git a/t/app/controller/auth_social.t b/t/app/controller/auth_social.t index 6c80c9857..3a0539452 100644 --- a/t/app/controller/auth_social.t +++ b/t/app/controller/auth_social.t @@ -32,6 +32,8 @@ my $contact2 = $mech->create_contact_ok( ); my $resolver = Test::MockModule->new('Email::Valid'); +my $social = Test::MockModule->new('FixMyStreet::App::Controller::Auth::Social'); +$social->mock('generate_nonce', sub { 'MyAwesomeRandomValue' }); for my $test ( { @@ -72,7 +74,7 @@ for my $test ( mock_hosts => ['oidc.example.org'], host => 'oidc.example.org', error_callback => '/auth/OIDC?error=ERROR', - success_callback => '/auth/OIDC?code=response-code', + success_callback => '/auth/OIDC?code=response-code&state=login', redirect_pattern => qr{oidc\.example\.org/oauth2/v2\.0/authorize}, user_extras => [ [westminster_account_id => "1c304134-ef12-c128-9212-123908123901"], |