@@ -389,6 +389,10 @@ def response(header)
389
389
name : RDF ::Literal . new ( "Bob" , language : "en" ) ,
390
390
age : RDF ::Literal . new ( "30" , datatype : "http://www.w3.org/2001/XMLSchema#integer" ) ,
391
391
mbox :
RDF ::
URI . new ( "mailto:[email protected] " ) ,
392
+ triple : RDF ::Statement (
393
+ RDF ::URI ( 'http://work.example.org/s' ) ,
394
+ RDF ::URI ( 'http://work.example.org/p' ) ,
395
+ RDF ::URI ( 'http://work.example.org/o' ) ) ,
392
396
)
393
397
] )
394
398
expect ( solutions [ 0 ] [ "x" ] ) . to eq nodes [ "r2" ]
@@ -407,16 +411,20 @@ def response(header)
407
411
408
412
context "when parsing JSON" do
409
413
it "parses binding results correctly" do
410
- xml = File . read ( "spec/fixtures/results.json" )
414
+ json = File . read ( "spec/fixtures/results.json" )
411
415
nodes = { }
412
- solutions = SPARQL ::Client ::parse_json_bindings ( xml , nodes )
416
+ solutions = SPARQL ::Client ::parse_json_bindings ( json , nodes )
413
417
expect ( solutions ) . to eq RDF ::Query ::Solutions . new ( [
414
418
RDF ::Query ::Solution . new (
415
419
x : RDF ::Node . new ( "r2" ) ,
416
420
hpage : RDF ::URI . new ( "http://work.example.org/bob/" ) ,
417
421
name : RDF ::Literal . new ( "Bob" , language : "en" ) ,
418
422
age : RDF ::Literal . new ( "30" , datatype : "http://www.w3.org/2001/XMLSchema#integer" ) ,
419
423
mbox :
RDF ::
URI . new ( "mailto:[email protected] " ) ,
424
+ triple : RDF ::Statement (
425
+ RDF ::URI ( 'http://work.example.org/s' ) ,
426
+ RDF ::URI ( 'http://work.example.org/p' ) ,
427
+ RDF ::URI ( 'http://work.example.org/o' ) ) ,
420
428
)
421
429
] )
422
430
expect ( solutions [ 0 ] [ "x" ] ) . to eq nodes [ "r2" ]
0 commit comments