From 5229297173d7a3fd89709aa9988b027e56a18c63 Mon Sep 17 00:00:00 2001 From: Michiel de Jong Date: Wed, 29 Jun 2022 09:13:40 +0200 Subject: [PATCH] Resolve https://github.com/solid/web-access-control-spec/issues/105 --- package.json | 2 +- test/surface/create.test.ts | 28 ++++++++++++---------------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index eb33b0b..7f2b25f 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "scripts": { "build": "echo nothing to build", - "jest": "jest", + "jest": "jest test/surface/update.test.ts", "test": "echo nothing to test these tests", "postversion": "git push --follow-tags" }, diff --git a/test/surface/create.test.ts b/test/surface/create.test.ts index 2901e18..3ec158c 100644 --- a/test/surface/create.test.ts +++ b/test/surface/create.test.ts @@ -187,8 +187,7 @@ describe('Create', () => { testAllowed('Write', 'Write'); testAllowed('Append', 'Write'); - // DISPUTED - see https://github.com/solid/web-access-control-spec/issues/105 - it.skip(`is disallowed without default Write`, async () => { + it(`is disallowed without default Write`, async () => { const testing = `test-disallowed-default`; const containerUrl = makeContainerUrl(testFolderUrl, using, testing); // This will do mkdir-p: @@ -220,7 +219,7 @@ describe('Create', () => { expect(result.status).toEqual(403); }); - it(`is disallowed without accessTo Write or Append`, async () => { + it(`is disallowed without accessTo Write`, async () => { const testing = `test-disallowed-accessTo`; const containerUrl = makeContainerUrl(testFolderUrl, using, testing); // This will do mkdir-p: @@ -235,7 +234,7 @@ describe('Create', () => { const aclDocUrl = await solidLogicAlice.findAclDocUrl(containerUrl); await solidLogicAlice.fetch(aclDocUrl, { method: 'PUT', - body: makeBody('acl:Read, acl:Control', 'acl:Read, acl:Append, acl:Write, acl:Control', containerUrl), + body: makeBody('acl:Read, acl:Append, acl:Control', 'acl:Read, acl:Append, acl:Write, acl:Control', containerUrl), headers: { 'Content-Type': 'text/turtle', // 'If-None-Match': '*' - work around a bug in some servers that don't support If-None-Match on ACL doc URLs @@ -293,8 +292,7 @@ describe('Create', () => { testAllowed('Write', 'Write'); testAllowed('Append', 'Write'); - // DISPUTED - see https://github.com/solid/web-access-control-spec/issues/105 - it.skip(`is disallowed without default Write`, async () => { + it(`is disallowed without default Write`, async () => { const testing = `test-disallowed-default`; const containerUrl = makeContainerUrl(testFolderUrl, using, testing); // This will do mkdir-p: @@ -330,7 +328,7 @@ describe('Create', () => { expect(result.status).toEqual(403); }); - it(`is disallowed without accessTo Write or Append`, async () => { + it(`is disallowed without accessTo Write`, async () => { const testing = `test-disallowed-accessTo`; const containerUrl = makeContainerUrl(testFolderUrl, using, testing); // This will do mkdir-p: @@ -345,7 +343,7 @@ describe('Create', () => { const aclDocUrl = await solidLogicAlice.findAclDocUrl(containerUrl); await solidLogicAlice.fetch(aclDocUrl, { method: 'PUT', - body: makeBody('acl:Read, acl:Control', 'acl:Read, acl:Append, acl:Write, acl:Control', containerUrl), + body: makeBody('acl:Read, acl:Append, acl:Control', 'acl:Read, acl:Append, acl:Write, acl:Control', containerUrl), headers: { 'Content-Type': 'text/turtle', // 'If-None-Match': '*' - work around a bug in some servers that don't support If-None-Match on ACL doc URLs @@ -404,8 +402,7 @@ describe('Create', () => { testAllowed('Write', 'Write'); testAllowed('Append', 'Write'); - // DISPUTED - see https://github.com/solid/web-access-control-spec/issues/105 - it.skip(`is disallowed without default Write`, async () => { + it(`is disallowed without default Write`, async () => { const testing = `disallowed-default`; const containerUrl = makeContainerUrl(testFolderUrl, using, testing); // This will do mkdir-p: @@ -437,7 +434,7 @@ describe('Create', () => { expect(result.status).toEqual(403); }); - it(`is disallowed without accessTo Write or Append`, async () => { + it(`is disallowed without accessTo Write`, async () => { const testing = `disallowed-accessTo`; const containerUrl = makeContainerUrl(testFolderUrl, using, testing); // This will do mkdir-p: @@ -452,7 +449,7 @@ describe('Create', () => { const aclDocUrl = await solidLogicAlice.findAclDocUrl(containerUrl); await solidLogicAlice.fetch(aclDocUrl, { method: 'PUT', - body: makeBody('acl:Read, acl:Control', 'acl:Read, acl:Append, acl:Write, acl:Control', containerUrl), + body: makeBody('acl:Read, acl:Append, acl:Control', 'acl:Read, acl:Append, acl:Write, acl:Control', containerUrl), headers: { 'Content-Type': 'text/turtle', // 'If-None-Match': '*' - work around a bug in some servers that don't support If-None-Match on ACL doc URLs @@ -512,8 +509,7 @@ describe('Create', () => { testAllowed('Write', 'Write'); testAllowed('Append', 'Write'); - // DISPUTED - see https://github.com/solid/web-access-control-spec/issues/105 - it.skip(`is disallowed without default Write`, async () => { + it(`is disallowed without default Write`, async () => { const testing = `disallowed-default`; const containerUrl = makeContainerUrl(testFolderUrl, using, testing); // This will do mkdir-p: @@ -547,7 +543,7 @@ describe('Create', () => { expect(result.status).toEqual(403); }); - it(`is disallowed without accessTo Write or Append`, async () => { + it(`is disallowed without accessTo Write`, async () => { const testing = `disallowed-default`; const containerUrl = makeContainerUrl(testFolderUrl, using, testing); // This will do mkdir-p: @@ -562,7 +558,7 @@ describe('Create', () => { const aclDocUrl = await solidLogicAlice.findAclDocUrl(containerUrl); await solidLogicAlice.fetch(aclDocUrl, { method: 'PUT', - body: makeBody('acl:Read, acl:Control', 'acl:Read, acl:Append, acl:Write, acl:Control', containerUrl), + body: makeBody('acl:Read, acl:Append, acl:Control', 'acl:Read, acl:Append, acl:Write, acl:Control', containerUrl), headers: { 'Content-Type': 'text/turtle', // 'If-None-Match': '*' - work around a bug in some servers that don't support If-None-Match on ACL doc URLs