Skip to content

Commit 4888834

Browse files
committed
Test case for credentials framing.
1 parent 4bfadfc commit 4888834

File tree

4 files changed

+65
-0
lines changed

4 files changed

+65
-0
lines changed

tests/frame-manifest.jsonld

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,15 @@
643643
"frame": "frame/g009-frame.jsonld",
644644
"expect": "frame/g009-out.jsonld",
645645
"option": {"specVersion": "json-ld-1.1"}
646+
},{
647+
"@id": "#tg010",
648+
"@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],
649+
"name": "Framing blank node unnamed graphs",
650+
"purpose": "Test embedded graphs",
651+
"input": "frame/g010-in.jsonld",
652+
"frame": "frame/g010-frame.jsonld",
653+
"expect": "frame/g010-out.jsonld",
654+
"option": {"specVersion": "json-ld-1.1"}
646655
}, {
647656
"@id": "#tin01",
648657
"@type": ["jld:PositiveEvaluationTest", "jld:FrameTest"],

tests/frame/g010-frame.jsonld

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"proof": {"@id": "ex:proof", "@container": "@graph"}
5+
},
6+
"@graph": {
7+
"subject": {},
8+
"proof": {
9+
"@type": "ex:Proof"
10+
}
11+
}
12+
}

tests/frame/g010-in.jsonld

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"@id": "ex:cred",
3+
"ex:subject": {
4+
"@id": "ex:Subject",
5+
"ex:name": "the subject",
6+
"ex:knows": {
7+
"@id": "ex:issuer",
8+
"ex:name": "Someone else"
9+
}
10+
},
11+
"ex:proof": {
12+
"@graph": {
13+
"@type": "ex:Proof",
14+
"ex:name": "the proof",
15+
"ex:signer": [{
16+
"@id": "ex:Subject",
17+
"ex:name": "something different"
18+
}]
19+
}
20+
}
21+
}

tests/frame/g010-out.jsonld

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"proof": {"@id": "ex:proof", "@container": "@graph"}
5+
},
6+
"@id": "ex:cred",
7+
"ex:subject": {
8+
"@id": "ex:Subject",
9+
"ex:name": "the subject",
10+
"ex:knows": {
11+
"@id": "ex:issuer",
12+
"ex:name": "Someone else"
13+
}
14+
},
15+
"proof": {
16+
"@type": "ex:Proof",
17+
"ex:name": "the proof",
18+
"ex:signer": {
19+
"@id": "ex:Subject",
20+
"ex:name": "something different"
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)