Skip to content

Commit

Permalink
added & to fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
saumier committed Nov 22, 2024
1 parent 7ea453a commit d9b387f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions tests/fix_malformed_urls_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ def setup
def test_fix_malformed_urls
sparql = SPARQL.parse(File.read(@fix_malformed_urls_sparql_file), update: true)
graph = RDF::Graph.load("./tests/fixtures/test_fix_malformed_urls.jsonld")
# puts "before: #{graph.dump(:jsonld)}"
graph.query(sparql)
# puts "after: #{graph.dump(:jsonld)}"
assert_equal RDF::URI("https://example.com/?post_type=event&p=12292"), graph.query([RDF::URI("http://example.com/123"), RDF::URI("http://schema.org/url"), nil]).each.objects.first
assert graph.has_statement?(RDF::Statement.new(RDF::URI("http://example.com/123"), RDF::Vocab::SCHEMA.url, RDF::URI("https://example.com/?post_type=event&p=12292")))
end
end
6 changes: 2 additions & 4 deletions tests/fixtures/test_fix_malformed_urls.jsonld
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"@context": {
"schema": "http://schema.org/"
},
"@context": "http://schema.org/",
"@id": "http://example.com/123",
"@type": "schema:VirtualLocation",
"schema:url": {
"@id": "https://example.com/?post_type=event&p=12292"
"@id": "https://example.com/?post_type=event&p=12292"
}
}

0 comments on commit d9b387f

Please sign in to comment.