Skip to content

Commit b175544

Browse files
committed
Added test for pr #20.
1 parent 4dfd8f9 commit b175544

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

spec/frame_spec.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,4 +566,24 @@
566566
end
567567
end
568568
end
569+
570+
context "problem cases" do
571+
it "pr #20" do
572+
expanded = [
573+
{
574+
"@id"=>"_:gregg",
575+
"@type"=>"http://xmlns.com/foaf/0.1/Person",
576+
"http://xmlns.com/foaf/0.1/name" => "Gregg Kellogg"
577+
}, {
578+
"@id"=>"http://manu.sporny.org/#me",
579+
"@type"=> "http://xmlns.com/foaf/0.1/Person",
580+
"http://xmlns.com/foaf/0.1/knows"=> {"@id"=>"_:gregg"},
581+
"http://xmlns.com/foaf/0.1/name"=>"Manu Sporny"
582+
}
583+
]
584+
framed = JSON::LD::API.frame(expanded, {})
585+
data = framed["@graph"].first
586+
expect(data["mising_value"]).to be_nil
587+
end
588+
end
569589
end

0 commit comments

Comments
 (0)