Skip to content

Commit 29b5ab2

Browse files
committed
@embed in list test.
1 parent 48e1e1a commit 29b5ab2

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

spec/frame_spec.rb

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2438,7 +2438,31 @@
24382438
"@id": "ex:entity1"
24392439
}),
24402440
processingMode: "json-ld-1.1"
2441-
}
2441+
},
2442+
"don't embed list elements": {
2443+
frame: %({
2444+
"@context": {"ex": "http://example.org/"},
2445+
"ex:embed": {
2446+
"@list": [{"@embed": "@never"}]
2447+
}
2448+
}),
2449+
input: %({
2450+
"@context": {"ex": "http://example.org/"},
2451+
"@id": "ex:Sub1",
2452+
"ex:embed": {
2453+
"@list": [{
2454+
"@id": "ex:Sub2",
2455+
"ex:prop": "property"
2456+
}]
2457+
}
2458+
}),
2459+
output: %({
2460+
"@context": {"ex": "http://example.org/"},
2461+
"@id": "ex:Sub1",
2462+
"ex:embed": {"@list": [{"@id": "ex:Sub2"}]}
2463+
}),
2464+
processingMode: "json-ld-1.1"
2465+
},
24422466
}.each do |title, params|
24432467
it title do
24442468
do_frame(params)

0 commit comments

Comments
 (0)