|
149 | 149 | it "should support SELECT with complex WHERE patterns" do |
150 | 150 | @query.select.where( |
151 | 151 | [:s, :p, :o], |
152 | | - [:s, RDF.type, RDF::DC.Document] |
| 152 | + [:s, RDF.type, RDF::DC.BibliographicResource] |
153 | 153 | ).to_s.should == |
154 | | - "SELECT * WHERE { ?s ?p ?o . ?s <#{RDF.type}> <#{RDF::DC.Document}> . }" |
| 154 | + "SELECT * WHERE { ?s ?p ?o . ?s <#{RDF.type}> <#{RDF::DC.BibliographicResource}> . }" |
155 | 155 | end |
156 | 156 |
|
157 | 157 | it "should support SELECT WHERE patterns from different GRAPH contexts" do |
158 | 158 | @graph1 = "http://example1.org/" |
159 | 159 | @graph2 = "http://example2.org/" |
160 | | - @query.select.where([:s, :p, :o, :context => @graph1],[:s, RDF.type, RDF::DC.Document, :context => @graph2]).to_s.should == |
161 | | - "SELECT * WHERE { GRAPH <#{@graph1}> { ?s ?p ?o . } GRAPH <#{@graph2}> { ?s <#{RDF.type}> <#{RDF::DC.Document}> . } }" |
| 160 | + @query.select.where([:s, :p, :o, :context => @graph1],[:s, RDF.type, RDF::DC.BibliographicResource, :context => @graph2]).to_s.should == |
| 161 | + "SELECT * WHERE { GRAPH <#{@graph1}> { ?s ?p ?o . } GRAPH <#{@graph2}> { ?s <#{RDF.type}> <#{RDF::DC.BibliographicResource}> . } }" |
162 | 162 | end |
163 | 163 |
|
164 | 164 | it "should support string objects in SPARQL queries" do |
|
291 | 291 | it "should support OPTIONAL with GRAPH contexts" do |
292 | 292 | @graph1 = "http://example1.org/" |
293 | 293 | @graph2 = "http://example2.org/" |
294 | | - @query.select.where([:s, :p, :o, :context => @graph1]).optional([:s, RDF.type, RDF::DC.Document, :context => @graph2]).to_s.should == |
295 | | - "SELECT * WHERE { GRAPH <#{@graph1}> { ?s ?p ?o . } OPTIONAL { GRAPH <#{@graph2}> { ?s <#{RDF.type}> <#{RDF::DC.Document}> . } } }" |
| 294 | + @query.select.where([:s, :p, :o, :context => @graph1]).optional([:s, RDF.type, RDF::DC.BibliographicResource, :context => @graph2]).to_s.should == |
| 295 | + "SELECT * WHERE { GRAPH <#{@graph1}> { ?s ?p ?o . } OPTIONAL { GRAPH <#{@graph2}> { ?s <#{RDF.type}> <#{RDF::DC.BibliographicResource}> . } } }" |
296 | 296 | end |
297 | 297 |
|
298 | 298 | it "should support multiple OPTIONALs" do |
|
0 commit comments