Skip to content

Commit e991df5

Browse files
authored
Add content type headers unit tests
1 parent 600b69d commit e991df5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/SparqlEndpointFetcher-test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ describe('SparqlEndpointFetcher', () => {
329329
await fetcherThis.fetchRawStream(endpoint, querySelect, 'myacceptheader');
330330
const headers: Headers = new Headers();
331331
headers.append('Accept', 'myacceptheader');
332+
headers.append('Content-type', 'application/x-www-form-urlencoded');
332333
const body = new URLSearchParams();
333334
body.set('query', querySelect);
334335
expect(fetchCbThis).toHaveBeenCalledWith(
@@ -347,6 +348,7 @@ describe('SparqlEndpointFetcher', () => {
347348
await fetcherThis.fetchRawStream(endpoint, querySelect, 'myacceptheader');
348349
const headers: Headers = new Headers();
349350
headers.append('Accept', 'myacceptheader');
351+
headers.append('Content-type', 'application/sparql-query');
350352
const body = querySelect;
351353
expect(fetchCbThis).toHaveBeenCalledWith(
352354
'https://dbpedia.org/sparql',
@@ -366,6 +368,7 @@ describe('SparqlEndpointFetcher', () => {
366368
await fetcherThis.fetchRawStream(endpoint, querySelect, 'myacceptheader');
367369
const headers: Headers = new Headers();
368370
headers.append('Accept', 'myacceptheader');
371+
headers.append('Content-type', 'application/sparql-query');
369372
const body = querySelect;
370373
expect(fetchCbThis).toHaveBeenCalledWith(
371374
'https://dbpedia.org/sparql?infer=true&sameAs=false',

0 commit comments

Comments
 (0)