Skip to content

Commit 1998a5b

Browse files
committed
Removing the need to run tests in order
1 parent 06c5b19 commit 1998a5b

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

test/integration/acl-tls-test.js

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ describe('ACL with WebID+TLS', function () {
231231
done()
232232
})
233233
})
234-
it("should create test file's acl file", function (done) {
234+
it('should create test file\'s acl file', function (done) {
235235
var options = createOptions('/acl-tls/write-acl/test-file.acl', 'user1')
236236
options.headers = {
237237
'content-type': 'text/turtle'
@@ -243,7 +243,7 @@ describe('ACL with WebID+TLS', function () {
243243
done()
244244
})
245245
})
246-
it("should not access test file's acl file", function (done) {
246+
it('should not access test file\'s acl file', function (done) {
247247
var options = createOptions('/acl-tls/write-acl/test-file.acl', 'user1')
248248
options.headers = {
249249
accept: 'text/turtle'
@@ -267,12 +267,10 @@ describe('ACL with WebID+TLS', function () {
267267
})
268268

269269
describe('Origin', function () {
270-
before(function () {
270+
before(function (done) {
271271
rm('acl-tls/origin/test-folder/.acl')
272-
})
273272

274-
it('should PUT new ACL file', function (done) {
275-
var options = createOptions('/acl-tls/origin/test-folder/.acl', 'user1', 'text/turtle')
273+
const options = createOptions('/acl-tls/origin/test-folder/.acl', 'user1', 'text/turtle')
276274
options.headers = {
277275
'content-type': 'text/turtle'
278276
}
@@ -294,6 +292,7 @@ describe('ACL with WebID+TLS', function () {
294292
// TODO user header
295293
})
296294
})
295+
297296
it('user1 should be able to access test directory', function (done) {
298297
var options = createOptions('/acl-tls/origin/test-folder/', 'user1')
299298
options.headers.origin = origin1
@@ -365,11 +364,9 @@ describe('ACL with WebID+TLS', function () {
365364
})
366365

367366
describe('Mixed statement Origin', function () {
368-
before(function () {
367+
before(function (done) {
369368
rm('acl-tls/origin/test-folder/.acl')
370-
})
371369

372-
it('should PUT new ACL file', function (done) {
373370
var options = createOptions('/acl-tls/origin/test-folder/.acl', 'user1', 'text/turtle')
374371
options.headers = {
375372
'content-type': 'text/turtle'
@@ -379,9 +376,9 @@ describe('ACL with WebID+TLS', function () {
379376
' <http://www.w3.org/ns/auth/acl#agent> <' + user1 + '>;\n' +
380377
' <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read>, <http://www.w3.org/ns/auth/acl#Write>, <http://www.w3.org/ns/auth/acl#Control> .\n' +
381378
'<#Owner2> a <http://www.w3.org/ns/auth/acl#Authorization>;\n' +
382-
' <http://www.w3.org/ns/auth/acl#accessTo> <https://localhost:3456/test/acl-tls/origin/test-folder/>;\n' +
383-
' <http://www.w3.org/ns/auth/acl#origin> <' + origin1 + '>;\n' +
384-
' <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read>, <http://www.w3.org/ns/auth/acl#Write>, <http://www.w3.org/ns/auth/acl#Control> .\n' +
379+
' <http://www.w3.org/ns/auth/acl#accessTo> <https://localhost:3456/test/acl-tls/origin/test-folder/>;\n' +
380+
' <http://www.w3.org/ns/auth/acl#origin> <' + origin1 + '>;\n' +
381+
' <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read>, <http://www.w3.org/ns/auth/acl#Write>, <http://www.w3.org/ns/auth/acl#Control> .\n' +
385382
'<#Public> a <http://www.w3.org/ns/auth/acl#Authorization>;\n' +
386383
' <http://www.w3.org/ns/auth/acl#accessTo> <./>;\n' +
387384
' <http://www.w3.org/ns/auth/acl#agentClass> <http://www.w3.org/ns/auth/acl#AuthenticatedAgent>;\n' +
@@ -395,6 +392,7 @@ describe('ACL with WebID+TLS', function () {
395392
// TODO user header
396393
})
397394
})
395+
398396
it('user1 should be able to access test directory', function (done) {
399397
var options = createOptions('/acl-tls/origin/test-folder/', 'user1')
400398
options.headers.origin = origin1
@@ -582,7 +580,7 @@ describe('ACL with WebID+TLS', function () {
582580

583581
describe('Append-only', function () {
584582
// var body = fs.readFileSync(__dirname + '/resources/acl-tls/append-acl/abc.ttl.acl')
585-
it("user1 should be able to access test file's ACL file", function (done) {
583+
it('user1 should be able to access test file\'s ACL file', function (done) {
586584
var options = createOptions('/acl-tls/append-acl/abc.ttl.acl', 'user1')
587585
request.head(options, function (error, response) {
588586
assert.equal(error, null)
@@ -623,7 +621,7 @@ describe('ACL with WebID+TLS', function () {
623621
done()
624622
})
625623
})
626-
it("user2 should not be able to access test file's ACL file", function (done) {
624+
it('user2 should not be able to access test file\'s ACL file', function (done) {
627625
var options = createOptions('/acl-tls/append-acl/abc.ttl.acl', 'user2')
628626
request.head(options, function (error, response, body) {
629627
assert.equal(error, null)
@@ -685,7 +683,7 @@ describe('ACL with WebID+TLS', function () {
685683
' <http://www.w3.org/ns/auth/acl#accessTo> <./abc2.ttl>;\n' +
686684
' <http://www.w3.org/ns/auth/acl#agent> <' + user2 + '>;\n' +
687685
' <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read>, <http://www.w3.org/ns/auth/acl#Write>.\n'
688-
it("user1 should be able to modify test file's ACL file", function (done) {
686+
it('user1 should be able to modify test file\'s ACL file', function (done) {
689687
var options = createOptions('/acl-tls/append-acl/abc2.ttl.acl', 'user1')
690688
options.headers = {
691689
'content-type': 'text/turtle'
@@ -697,7 +695,7 @@ describe('ACL with WebID+TLS', function () {
697695
done()
698696
})
699697
})
700-
it("user1 should be able to access test file's ACL file", function (done) {
698+
it('user1 should be able to access test file\'s ACL file', function (done) {
701699
var options = createOptions('/acl-tls/append-acl/abc2.ttl.acl', 'user1')
702700
request.head(options, function (error, response, body) {
703701
assert.equal(error, null)
@@ -733,7 +731,7 @@ describe('ACL with WebID+TLS', function () {
733731
done()
734732
})
735733
})
736-
it("user2 should not be able to access test file's ACL file", function (done) {
734+
it('user2 should not be able to access test file\'s ACL file', function (done) {
737735
var options = createOptions('/acl-tls/append-acl/abc2.ttl.acl', 'user2')
738736
request.head(options, function (error, response, body) {
739737
assert.equal(error, null)
@@ -791,7 +789,7 @@ describe('ACL with WebID+TLS', function () {
791789
' <http://www.w3.org/ns/auth/acl#default> <./>;\n' +
792790
' <http://www.w3.org/ns/auth/acl#agentClass> <http://xmlns.com/foaf/0.1/Agent>;\n' +
793791
' <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read> .\n'
794-
it("user1 should be able to modify test directory's ACL file", function (done) {
792+
it('user1 should be able to modify test directory\'s ACL file', function (done) {
795793
var options = createOptions('/acl-tls/write-acl/default-for-new/.acl', 'user1')
796794
options.headers = {
797795
'content-type': 'text/turtle'
@@ -803,7 +801,7 @@ describe('ACL with WebID+TLS', function () {
803801
done()
804802
})
805803
})
806-
it("user1 should be able to access test direcotory's ACL file", function (done) {
804+
it('user1 should be able to access test direcotory\'s ACL file', function (done) {
807805
var options = createOptions('/acl-tls/write-acl/default-for-new/.acl', 'user1')
808806
request.head(options, function (error, response, body) {
809807
assert.equal(error, null)
@@ -831,7 +829,7 @@ describe('ACL with WebID+TLS', function () {
831829
done()
832830
})
833831
})
834-
it("user2 should not be able to access test direcotory's ACL file", function (done) {
832+
it('user2 should not be able to access test direcotory\'s ACL file', function (done) {
835833
var options = createOptions('/acl-tls/write-acl/default-for-new/.acl', 'user2')
836834
request.head(options, function (error, response, body) {
837835
assert.equal(error, null)

0 commit comments

Comments
 (0)