Skip to content

Commit

Permalink
Fixed integration tests for the default N-Triples MIME type changing
Browse files Browse the repository at this point in the history
  • Loading branch information
njh committed Aug 26, 2013
1 parent 07b2d6f commit f72a47e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/integration/sparql11-protocol_test.pl
Expand Up @@ -34,7 +34,7 @@
# Test a CONSTRUCT query an empty store
$response = $ua->get($base_url."query?query=CONSTRUCT+%7B%3Fs+%3Fp+%3Fo%7D+WHERE+%7B%3Fs+%3Fp+%3Fo%7D&format=ntriples");
is($response->code, 200, "SPARQL CONSTRUCT query on empty store does not give an error");
is($response->content_type, 'text/plain', "SPARQL CONSTRUCT query gives the right response type");
is($response->content_type, 'application/n-triples', "SPARQL CONSTRUCT query gives the right response type");
is($response->content, '', "SPARQL CONSTRUCT query on empty store returns empty N-Triples data");

# Test an ASK query an empty store
Expand Down Expand Up @@ -139,7 +139,7 @@
# Test a CONSTRUCT query with a ntriples response
$response = $ua->get($base_url."query?query=CONSTRUCT+%7B%3Fs+%3Fp+%3Fo%7D+WHERE+%7B%3Fs+%3Fp+%3Fo%7D&format=ntriples");
is($response->code, 200, "SPARQL CONSTRUCT query for ntriples is successful");
is($response->content_type, "text/plain", "SPARQL CONSTRUCT query Content Type for ntriples is correct");
is($response->content_type, "application/n-triples", "SPARQL CONSTRUCT query Content Type for ntriples is correct");
like($response->content, qr[<http://example.org/dir/file#frag>\s+<http://example.org/value>\s+"v"\s+.\n], "SPARQL Construct response for ntriples should be correct");

# Test a CONSTRUCT query with RDF/XML content negotiation
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/sparql11-service-description_test.pl
Expand Up @@ -60,8 +60,8 @@

# GET the service description from its own URL as n-triples
$response = $ua->get($base_url.'description?format=ntriples');
is($response->code, 200, 'GET to description endpoint for application/rdf+xml is successful');
is($response->content_type, "text/plain", "GET to description endpoint for application/rdf+xml has correct MIME type");
is($response->code, 200, 'GET to description endpoint for N-Triples is successful');
is($response->content_type, "application/n-triples", "GET to description endpoint for N-Triples has correct MIME type");

# Check for the service node
my ($service_node) = ($response->content =~ qr[(\S+) <$rdf_ns#type> <$sd_ns#Service>]);
Expand Down

0 comments on commit f72a47e

Please sign in to comment.