Skip to content

Commit 5b035bb

Browse files
author
nicola
committed
all test passes except the ones we skip
1 parent c10c40a commit 5b035bb

1 file changed

Lines changed: 14 additions & 15 deletions

File tree

‎test/acl.js‎

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -850,18 +850,17 @@ describe('ACL HTTP', function() {
850850

851851
describe("defaultForNew", function() {
852852
var body = "<#Owner>\n" +
853-
" <http://www.w3.org/ns/auth/acl#accessTo> <" + address + testDir + "/" + ">, <" +
854-
address + testDirAclFile + ">;\n" +
853+
" <http://www.w3.org/ns/auth/acl#accessTo> <./>;\n" +
855854
" <http://www.w3.org/ns/auth/acl#agent> <" + user1 + ">;\n" +
856-
" <http://www.w3.org/ns/auth/acl#defaultForNew> <" + address + testDir + "/" + ">;\n" +
857-
" <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" +
855+
" <http://www.w3.org/ns/auth/acl#defaultForNew> <./>;\n" +
856+
" <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" +
858857
"<#Default>\n" +
859-
" <http://www.w3.org/ns/auth/acl#accessTo> <" + address + testDir + "/" + ">;\n" +
860-
" <http://www.w3.org/ns/auth/acl#defaultForNew> <" + address + testDir + "/" + ">;\n" +
858+
" <http://www.w3.org/ns/auth/acl#accessTo> <./>;\n" +
859+
" <http://www.w3.org/ns/auth/acl#defaultForNew> <./>;\n" +
861860
" <http://www.w3.org/ns/auth/acl#agentClass> <http://xmlns.com/foaf/0.1/Agent>;\n" +
862861
" <http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read> .\n";
863862
it("user1 should be able to modify test direcotory's ACL file", function(done) {
864-
var options = createOptions(testDirAclFile, 'user1');
863+
var options = createOptions('/acl/write-acl/default-for-new/.acl', 'user1');
865864
options.headers = {
866865
'content-type': 'text/turtle'
867866
};
@@ -873,15 +872,15 @@ describe('ACL HTTP', function() {
873872
});
874873
});
875874
it("user1 should be able to access test direcotory's ACL file", function(done) {
876-
var options = createOptions(testDirAclFile, 'user1');
875+
var options = createOptions('/acl/write-acl/default-for-new/.acl', 'user1');
877876
request.head(options, function(error, response, body) {
878877
assert.equal(error, null);
879878
assert.equal(response.statusCode, 200);
880879
done();
881880
});
882881
});
883882
it("user1 should be able to create new test file", function(done) {
884-
var options = createOptions(abcdFile, 'user1');
883+
var options = createOptions('/acl/write-acl/default-for-new/test-file.ttl', 'user1');
885884
options.headers = {
886885
'content-type': 'text/turtle'
887886
};
@@ -893,31 +892,31 @@ describe('ACL HTTP', function() {
893892
});
894893
});
895894
it("user1 should be able to access new test file", function(done) {
896-
var options = createOptions(abcdFile, 'user1');
895+
var options = createOptions('/acl/write-acl/default-for-new/test-file.ttl', 'user1');
897896
request.head(options, function(error, response, body) {
898897
assert.equal(error, null);
899898
assert.equal(response.statusCode, 200);
900899
done();
901900
});
902901
});
903902
it("user2 should not be able to access test direcotory's ACL file", function(done) {
904-
var options = createOptions(testDirAclFile, 'user2');
903+
var options = createOptions('/acl/write-acl/default-for-new/.acl', 'user2');
905904
request.head(options, function(error, response, body) {
906905
assert.equal(error, null);
907906
assert.equal(response.statusCode, 403);
908907
done();
909908
});
910909
});
911910
it("user2 should be able to access new test file", function(done) {
912-
var options = createOptions(abcdFile, 'user2');
911+
var options = createOptions('/acl/write-acl/default-for-new/test-file.ttl', 'user2');
913912
request.head(options, function(error, response, body) {
914913
assert.equal(error, null);
915914
assert.equal(response.statusCode, 200);
916915
done();
917916
});
918917
});
919918
it("user2 should not be able to modify new test file", function(done) {
920-
var options = createOptions(abcdFile, 'user2');
919+
var options = createOptions('/acl/write-acl/default-for-new/test-file.ttl', 'user2');
921920
options.headers = {
922921
'content-type': 'text/turtle'
923922
};
@@ -929,15 +928,15 @@ describe('ACL HTTP', function() {
929928
});
930929
});
931930
it("agent should be able to access new test file", function(done) {
932-
var options = createOptions(abcdFile);
931+
var options = createOptions('/acl/write-acl/default-for-new/test-file.ttl');
933932
request.head(options, function(error, response, body) {
934933
assert.equal(error, null);
935934
assert.equal(response.statusCode, 200);
936935
done();
937936
});
938937
});
939938
it("agent should not be able to modify new test file", function(done) {
940-
var options = createOptions(abcdFile);
939+
var options = createOptions('/acl/write-acl/default-for-new/test-file.ttl');
941940
options.headers = {
942941
'content-type': 'text/turtle'
943942
};

0 commit comments

Comments
 (0)