Skip to content

Commit 5127390

Browse files
committed
chore: fix some tests
Signed-off-by: Mirko Mollik <mirkomollik@gmail.com>
1 parent cc52d85 commit 5127390

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

packages/issuer-rest/lib/__tests__/IssuerTokenServer.spec.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ describe('OID4VCIServer', () => {
6060
grants: {
6161
'urn:ietf:params:oauth:grant-type:pre-authorized_code': {
6262
user_pin_required: true,
63+
tx_code: {
64+
length: 6,
65+
input_mode: 'numeric',
66+
description: 'Please enter the 6 digit code you received on your phone',
67+
},
6368
'pre-authorized_code': preAuthorizedCode1,
6469
},
6570
},
@@ -79,7 +84,6 @@ describe('OID4VCIServer', () => {
7984
'urn:ietf:params:oauth:grant-type:pre-authorized_code': {
8085
...credentialOfferState1.credentialOffer.credential_offer?.grants?.['urn:ietf:params:oauth:grant-type:pre-authorized_code'],
8186
'pre-authorized_code': preAuthorizedCode2,
82-
user_pin_required: false,
8387
},
8488
},
8589
},
@@ -185,7 +189,7 @@ describe('OID4VCIServer', () => {
185189
it('should return http code 400 with message User pin is required', async () => {
186190
const res = await requests(app)
187191
.post('/token')
188-
.send(`grant_type=urn:ietf:params:oauth:grant-type:pre-authorized_code&pre-authorized_code=${preAuthorizedCode1}`)
192+
.send(`grant_type=urn:ietf:params:oauth:grant-type:pre-authorized_code&pre-authorized_code=${preAuthorizedCode1}&user_pin=12345678`)
189193
expect(res.statusCode).toEqual(400)
190194
const actual = JSON.parse(res.text)
191195
expect(actual).toEqual({

0 commit comments

Comments
 (0)