@@ -9,26 +9,21 @@ import {
9
9
ProofRequest ,
10
10
} from '@aries-framework/core'
11
11
12
- export const INDY_CREDENTIAL_OFFER_ATTACHMENT_ID = 'libindy-cred-offer-0'
13
-
14
12
describe ( 'Present Proof' , ( ) => {
15
- let credDefId : string
16
-
17
- beforeAll ( ( ) => {
18
- credDefId = '9vPXgSpQJPkJEALbLXueBp:3:CL:57753:tag1'
19
- } )
13
+ const credDefId = '9vPXgSpQJPkJEALbLXueBp:3:CL:57753:tag1'
14
+ const nonce = 'testtesttest12345'
20
15
21
- test ( 'attribute names match, same cred def filter ' , ( ) => {
16
+ test ( 'attribute names match' , ( ) => {
22
17
const attributes = {
23
- name : new ProofAttributeInfo ( {
18
+ age1 : new ProofAttributeInfo ( {
24
19
name : 'age' ,
25
20
restrictions : [
26
21
new AttributeFilter ( {
27
22
credentialDefinitionId : credDefId ,
28
23
} ) ,
29
24
] ,
30
25
} ) ,
31
- age : new ProofAttributeInfo ( {
26
+ age2 : new ProofAttributeInfo ( {
32
27
name : 'age' ,
33
28
restrictions : [
34
29
new AttributeFilter ( {
@@ -38,21 +33,19 @@ describe('Present Proof', () => {
38
33
} ) ,
39
34
}
40
35
41
- const nonce = 'testtesttest12345'
42
-
43
36
const proofRequest = new ProofRequest ( {
44
37
name : 'proof-request' ,
45
38
version : '1.0' ,
46
39
nonce,
47
40
requestedAttributes : attributes ,
48
41
} )
49
42
50
- expect ( ( ) => checkProofRequestForDuplicates ( proofRequest ) ) . toThrowError ( AriesFrameworkError )
43
+ expect ( ( ) => checkProofRequestForDuplicates ( proofRequest ) ) . not . toThrow ( )
51
44
} )
52
45
53
- test ( 'attribute names match with predicates name, same cred def filter ' , ( ) => {
46
+ test ( 'attribute names match with predicates name' , ( ) => {
54
47
const attributes = {
55
- name : new ProofAttributeInfo ( {
48
+ attrib : new ProofAttributeInfo ( {
56
49
name : 'age' ,
57
50
restrictions : [
58
51
new AttributeFilter ( {
@@ -63,7 +56,7 @@ describe('Present Proof', () => {
63
56
}
64
57
65
58
const predicates = {
66
- age : new ProofPredicateInfo ( {
59
+ predicate : new ProofPredicateInfo ( {
67
60
name : 'age' ,
68
61
predicateType : PredicateType . GreaterThanOrEqualTo ,
69
62
predicateValue : 50 ,
@@ -75,8 +68,6 @@ describe('Present Proof', () => {
75
68
} ) ,
76
69
}
77
70
78
- const nonce = 'testtesttest12345'
79
-
80
71
const proofRequest = new ProofRequest ( {
81
72
name : 'proof-request' ,
82
73
version : '1.0' ,
0 commit comments