Skip to content

Commit d419882

Browse files
committed
update POST create container test
1 parent d56cdf0 commit d419882

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.14.0
1+
v18.19.0

test/integration/http-test.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -983,13 +983,23 @@ describe('HTTP APIs', function () {
983983
it('should create container', function (done) {
984984
server.post('/post-tests/')
985985
.set('content-type', 'text/turtle')
986-
.set('slug', 'loans.acl')
986+
.set('slug', 'loans.acl.meta')
987987
.set('link', '<http://www.w3.org/ns/ldp#BasicContainer>; rel="type"')
988988
.send(postRequest2Body)
989989
.expect('location', /\/post-tests\/loans\//)
990-
.expect(201, done)
990+
.expect(201)
991+
.end((err, res) => {
992+
if (err) return done(err)
993+
try {
994+
postLocation = res.headers.location
995+
assert(!postLocation.endsWith('.acl/') && !postLocation.endsWith('.meta/'), 'Container name should not end with .acl or .meta')
996+
} catch (err) {
997+
return done(err)
998+
}
999+
done()
1000+
})
9911001
})
992-
it('should be able to access newly container', function (done) {
1002+
it('should be able to access newly created container', function (done) {
9931003
console.log(postLocation)
9941004
server.get(postLocation)
9951005
// .expect('content-type', /text\/turtle/)

0 commit comments

Comments
 (0)