diff --git a/pubsignals/query_test.go b/pubsignals/query_test.go index b824178..39ca4cf 100644 --- a/pubsignals/query_test.go +++ b/pubsignals/query_test.go @@ -598,9 +598,10 @@ func TestCheckRequest_Error(t *testing.T) { }, }, pubSig: &CircuitOutputs{ - IssuerID: &issuerID, - ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")), - Timestamp: now, + IssuerID: &issuerID, + ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")), + Timestamp: now, + IsRevocationChecked: 1, }, expErr: errors.New("multiple requests not supported"), loader: &mockJSONLDSchemaLoader{ @@ -620,9 +621,10 @@ func TestCheckRequest_Error(t *testing.T) { }, }, pubSig: &CircuitOutputs{ - IssuerID: &issuerID, - ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")), - Timestamp: now, + IssuerID: &issuerID, + ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")), + Timestamp: now, + IsRevocationChecked: 1, }, expErr: errors.New("failed cast type map[string]interface"), loader: &mockJSONLDSchemaLoader{ @@ -645,9 +647,10 @@ func TestCheckRequest_Error(t *testing.T) { }, }, pubSig: &CircuitOutputs{ - IssuerID: &issuerID, - ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")), - Timestamp: now, + IssuerID: &issuerID, + ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")), + Timestamp: now, + IsRevocationChecked: 1, }, expErr: errors.New("multiple requests not supported"), loader: &mockJSONLDSchemaLoader{ @@ -669,10 +672,11 @@ func TestCheckRequest_Error(t *testing.T) { }, }, pubSig: &CircuitOutputs{ - IssuerID: &issuerID, - ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")), - Operator: 3, - Timestamp: now, + IssuerID: &issuerID, + ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")), + Operator: 3, + Timestamp: now, + IsRevocationChecked: 1, }, expErr: ErrRequestOperator, loader: &mockJSONLDSchemaLoader{ @@ -694,11 +698,12 @@ func TestCheckRequest_Error(t *testing.T) { }, }, pubSig: &CircuitOutputs{ - IssuerID: &issuerID, - ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")), - Operator: 5, - Value: []*big.Int{big.NewInt(40)}, - Timestamp: now, + IssuerID: &issuerID, + ClaimSchema: utils.CreateSchemaHash([]byte("https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld#KYCCountryOfResidenceCredential")), + Operator: 5, + Value: []*big.Int{big.NewInt(40)}, + Timestamp: now, + IsRevocationChecked: 1, }, expErr: ErrInvalidValues, loader: &mockJSONLDSchemaLoader{ @@ -792,7 +797,7 @@ func TestCheckRequest_Error(t *testing.T) { Value: []*big.Int{big.NewInt(20)}, Merklized: 0, SlotIndex: 0, - IsRevocationChecked: 0, + IsRevocationChecked: 1, Timestamp: now, }, expErr: errors.New("invalid operation '$lt' for field type 'http://www.w3.org/2001/XMLSchema#boolean'"), @@ -825,7 +830,7 @@ func TestCheckRequest_Error(t *testing.T) { }(), Merklized: 0, SlotIndex: 0, - IsRevocationChecked: 0, + IsRevocationChecked: 1, Timestamp: now, }, expErr: ErrNegativeValue,