Skip to content

Commit

Permalink
Added unit test for RAR changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gyaneshgouraw-okta committed Apr 15, 2024
1 parent 1a9585e commit a185a48
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/auth/oauth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,25 @@ describe('OAuth', () => {
},
});
});

it('should send authorization_details when provided', async () => {
const oauth = new OAuth(opts);
await expect(
oauth.pushedAuthorization({
client_id: 'test-client-id',
response_type: 'code',
redirect_uri: 'https://example.com',
authorization_details: JSON.stringify([
{ type: 'payment_initiation', actions: ['write'] },
]),
})
).resolves.toMatchObject({
data: {
request_uri: 'https://www.request.uri',
expires_in: 86400,
},
});
});
});
});

Expand Down

0 comments on commit a185a48

Please sign in to comment.