@@ -2068,7 +2068,7 @@ describe('auth', () => {
2068
2068
expect ( token ) . to . be . a ( 'object' ) ;
2069
2069
} ) ;
2070
2070
2071
- it ( 'key rotation use case' , async ( ) => {
2071
+ it . only ( 'key rotation use case' , async ( ) => {
2072
2072
const claimReq : CredentialRequest = {
2073
2073
credentialSchema :
2074
2074
'https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json/KYCAgeCredential-v4.json' ,
@@ -2206,6 +2206,10 @@ describe('auth', () => {
2206
2206
) ;
2207
2207
expect ( issuerAuthCredential2 ) . to . be . deep . equal ( credential2 ) ;
2208
2208
2209
+ // check we can issue new credential with k2
2210
+ const issuerCred2 = await idWallet . issueCredential ( issuerDID , claimReq ) ;
2211
+ expect ( issuerCred2 ) . to . be . not . undefined ;
2212
+
2209
2213
const treesModel2 = await idWallet . getDIDTreeModel ( issuerDID ) ;
2210
2214
const [ ctrHex2 , rtrHex2 , rorTrHex2 ] = await Promise . all ( [
2211
2215
treesModel2 . claimsTree . root ( ) ,
@@ -2230,6 +2234,11 @@ describe('auth', () => {
2230
2234
'no auth credentials found'
2231
2235
) ;
2232
2236
2237
+ // check that we can't issue new credential
2238
+ await expect ( idWallet . issueCredential ( issuerDID , claimReq ) ) . to . rejectedWith (
2239
+ 'no auth credentials found'
2240
+ ) ;
2241
+
2233
2242
// should this work?
2234
2243
await handleAuthorizationRequest ( userDID , authReqBody ) ;
2235
2244
} ) ;
0 commit comments