From d9b387fdb28663af9dfe29e72f9ceefa4788299f Mon Sep 17 00:00:00 2001 From: Gregory Saumier-Finch Date: Thu, 21 Nov 2024 19:46:21 -0500 Subject: [PATCH] added & to fixture --- tests/fix_malformed_urls_test.rb | 4 +--- tests/fixtures/test_fix_malformed_urls.jsonld | 6 ++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/fix_malformed_urls_test.rb b/tests/fix_malformed_urls_test.rb index ad5ad66..2a98aad 100644 --- a/tests/fix_malformed_urls_test.rb +++ b/tests/fix_malformed_urls_test.rb @@ -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 diff --git a/tests/fixtures/test_fix_malformed_urls.jsonld b/tests/fixtures/test_fix_malformed_urls.jsonld index eaa36f8..20ddfd2 100644 --- a/tests/fixtures/test_fix_malformed_urls.jsonld +++ b/tests/fixtures/test_fix_malformed_urls.jsonld @@ -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" } } \ No newline at end of file