@@ -201,7 +201,7 @@ describe('Pushed Request Object', () => {
201
201
. expect ( 303 )
202
202
. expect ( auth . validatePresence ( [ 'code' ] ) ) ;
203
203
204
- expect ( await this . provider . PushedAuthorizationRequest . find ( id ) ) . not . to . be . ok ;
204
+ expect ( await this . provider . PushedAuthorizationRequest . find ( id ) ) . to . be . ok . and . have . property ( 'consumed' ) . and . is . ok ;
205
205
} ) ;
206
206
207
207
it ( 'allows the request_uri to be used (when request object was not used but client has request_object_signing_alg for its optional use)' , async function ( ) {
@@ -234,7 +234,7 @@ describe('Pushed Request Object', () => {
234
234
. expect ( 303 )
235
235
. expect ( auth . validatePresence ( [ 'code' ] ) ) ;
236
236
237
- expect ( await this . provider . PushedAuthorizationRequest . find ( id ) ) . not . to . be . ok ;
237
+ expect ( await this . provider . PushedAuthorizationRequest . find ( id ) ) . to . be . ok . and . have . property ( 'consumed' ) . and . is . ok ;
238
238
} ) ;
239
239
} ) ;
240
240
} ) ;
@@ -556,7 +556,7 @@ describe('Pushed Request Object', () => {
556
556
. expect ( 303 )
557
557
. expect ( auth . validatePresence ( [ 'code' ] ) ) ;
558
558
559
- expect ( await this . provider . PushedAuthorizationRequest . find ( id ) ) . not . to . be . ok ;
559
+ expect ( await this . provider . PushedAuthorizationRequest . find ( id ) ) . to . be . ok . and . have . property ( 'consumed' ) . and . is . ok ;
560
560
} ) ;
561
561
562
562
it ( 'handles expired or invalid pushed authorization request object' , async function ( ) {
@@ -571,7 +571,7 @@ describe('Pushed Request Object', () => {
571
571
. expect ( auth . validateState )
572
572
. expect ( auth . validateClientLocation )
573
573
. expect ( auth . validateError ( 'invalid_request_uri' ) )
574
- . expect ( auth . validateErrorDescription ( 'request_uri is invalid or expired ' ) ) ;
574
+ . expect ( auth . validateErrorDescription ( 'request_uri is invalid, expired, or was already used ' ) ) ;
575
575
} ) ;
576
576
} ) ;
577
577
} ) ;
0 commit comments