Skip to content

Commit f55ee80

Browse files
kjetilkrubensworks
authored andcommitted
Set 403 for empty acl
1 parent 10f6b63 commit f55ee80

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/integration/acl-oidc-test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@ describe('ACL with WebID+OIDC over HTTP', function () {
127127
// })
128128
})
129129

130-
describe('empty .acl', function () {
130+
describe.only('empty .acl', function () {
131131
describe('with no default in parent path', function () {
132132
it('should give no access', function (done) {
133133
var options = createOptions('/empty-acl/test-folder', 'user1')
134134
options.body = ''
135135
request.put(options, function (error, response, body) {
136136
assert.equal(error, null)
137-
assert.equal(response.statusCode, 500)
137+
assert.equal(response.statusCode, 403)
138138
done()
139139
})
140140
})
@@ -143,15 +143,15 @@ describe('ACL with WebID+OIDC over HTTP', function () {
143143
options.body = ''
144144
request.put(options, function (error, response, body) {
145145
assert.equal(error, null)
146-
assert.equal(response.statusCode, 500)
146+
assert.equal(response.statusCode, 403)
147147
done()
148148
})
149149
})
150150
it('should not let read the .acl', function (done) {
151151
var options = createOptions('/empty-acl/.acl', 'user1')
152152
request.get(options, function (error, response, body) {
153153
assert.equal(error, null)
154-
assert.equal(response.statusCode, 500)
154+
assert.equal(response.statusCode, 403)
155155
done()
156156
})
157157
})
@@ -179,7 +179,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
179179
options.body = ''
180180
request.put(options, function (error, response, body) {
181181
assert.equal(error, null)
182-
assert.equal(response.statusCode, 201)
182+
assert.equal(response.statusCode, 403)
183183
done()
184184
})
185185
})
@@ -188,7 +188,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
188188
options.body = ''
189189
request.put(options, function (error, response, body) {
190190
assert.equal(error, null)
191-
assert.equal(response.statusCode, 201)
191+
assert.equal(response.statusCode, 403)
192192
done()
193193
})
194194
})
@@ -197,7 +197,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
197197
options.body = ''
198198
request.put(options, function (error, response, body) {
199199
assert.equal(error, null)
200-
assert.equal(response.statusCode, 201)
200+
assert.equal(response.statusCode, 403)
201201
done()
202202
})
203203
})

0 commit comments

Comments
 (0)