Skip to content

Commit 49b4fb9

Browse files
committed
Test storage description link discovery
1 parent 4581242 commit 49b4fb9

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

test/integration/http-test.mjs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const __dirname = path.dirname(__filename)
1212
const suffixAcl = '.acl'
1313
const suffixMeta = '.meta'
1414
const storageDescription = 'http://www.w3.org/ns/solid/terms#storageDescription'
15+
const storageDescriptionResource = 'https://localhost:8443/' + suffixMeta
1516
const server = setupSupertestServer({
1617
live: true,
1718
dataBrowserPath: 'default',
@@ -174,7 +175,7 @@ describe('HTTP APIs', function () {
174175
it('should have set storageDescription Link for resource',
175176
function (done) {
176177
server.options('/sampleContainer2/example1.ttl')
177-
.expect(hasHeader(storageDescription, 'https://localhost/' + suffixMeta))
178+
.expect(hasHeader(storageDescription, storageDescriptionResource))
178179
.end(done)
179180
})
180181

@@ -215,7 +216,7 @@ describe('HTTP APIs', function () {
215216

216217
it('should have set storageDescription Link for container', function (done) {
217218
server.options('/sampleContainer2/')
218-
.expect(hasHeader(storageDescription, 'https://localhost/' + suffixMeta))
219+
.expect(hasHeader(storageDescription, storageDescriptionResource))
219220
.end(done)
220221
})
221222
})
@@ -291,7 +292,7 @@ describe('HTTP APIs', function () {
291292
function (done) {
292293
server.get('/sampleContainer2/example1.ttl')
293294
.expect('content-type', /text\/turtle/)
294-
.expect(hasHeader(storageDescription, 'https://localhost/' + suffixMeta))
295+
.expect(hasHeader(storageDescription, storageDescriptionResource))
295296
.end(done)
296297
})
297298
it('should have set Link as Container/BasicContainer', function (done) {
@@ -415,7 +416,7 @@ describe('HTTP APIs', function () {
415416
it('should have set storageDescription Link for container',
416417
function (done) {
417418
server.get('/sampleContainer2/')
418-
.expect(hasHeader(storageDescription, 'https://localhost/' + suffixMeta))
419+
.expect(hasHeader(storageDescription, storageDescriptionResource))
419420
.expect('content-type', /text\/turtle/)
420421
.end(done)
421422
})
@@ -548,7 +549,7 @@ describe('HTTP APIs', function () {
548549
it('should have set storageDescription Link for resource',
549550
function (done) {
550551
server.head('/sampleContainer2/example1.ttl')
551-
.expect(hasHeader(storageDescription, 'https://localhost/' + suffixMeta))
552+
.expect(hasHeader(storageDescription, storageDescriptionResource))
552553
.end(done)
553554
})
554555
it('should have set Content-Type as text/turtle for Container',
@@ -574,7 +575,7 @@ describe('HTTP APIs', function () {
574575
it('should have set storageDescription Link for container',
575576
function (done) {
576577
server.head('/sampleContainer2/')
577-
.expect(hasHeader(storageDescription, 'https://localhost/' + suffixMeta))
578+
.expect(hasHeader(storageDescription, storageDescriptionResource))
578579
.end(done)
579580
})
580581
})

0 commit comments

Comments
 (0)