Skip to content

Commit 3c5c72b

Browse files
kjetilkrubensworks
authored andcommitted
Add tests to see if message for 403 for users is 'User Unauthorized'
1 parent c8275b7 commit 3c5c72b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/integration/acl-oidc-test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
383383
request.head(options, function (error, response, body) {
384384
assert.equal(error, null)
385385
assert.equal(response.statusCode, 403)
386+
assert.equal(response.statusMessage, 'User Unauthorized')
386387
done()
387388
})
388389
})
@@ -392,6 +393,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
392393
request.put(options, function (error, response, body) {
393394
assert.equal(error, null)
394395
assert.equal(response.statusCode, 403)
396+
assert.equal(response.statusMessage, 'User Unauthorized')
395397
done()
396398
})
397399
})
@@ -468,6 +470,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
468470
request.head(options, function (error, response, body) {
469471
assert.equal(error, null)
470472
assert.equal(response.statusCode, 403)
473+
assert.equal(response.statusMessage, 'User Unauthorized')
471474
done()
472475
})
473476
})
@@ -476,6 +479,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
476479
request.head(options, function (error, response, body) {
477480
assert.equal(error, null)
478481
assert.equal(response.statusCode, 403)
482+
assert.equal(response.statusMessage, 'User Unauthorized')
479483
done()
480484
})
481485
})
@@ -485,6 +489,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
485489
request.put(options, function (error, response, body) {
486490
assert.equal(error, null)
487491
assert.equal(response.statusCode, 403)
492+
assert.equal(response.statusMessage, 'User Unauthorized')
488493
done()
489494
})
490495
})
@@ -580,6 +585,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
580585
request.put(options, function (error, response, body) {
581586
assert.equal(error, null)
582587
assert.equal(response.statusCode, 403)
588+
assert.equal(response.statusMessage, 'User Unauthorized')
583589
done()
584590
})
585591
})
@@ -671,6 +677,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
671677
request.head(options, function (error, response, body) {
672678
assert.equal(error, null)
673679
assert.equal(response.statusCode, 403)
680+
assert.equal(response.statusMessage, 'User Unauthorized')
674681
done()
675682
})
676683
})
@@ -759,6 +766,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
759766
request.head(options, function (error, response, body) {
760767
assert.equal(error, null)
761768
assert.equal(response.statusCode, 403)
769+
assert.equal(response.statusMessage, 'User Unauthorized')
762770
done()
763771
})
764772
})
@@ -776,6 +784,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
776784
request.put(options, function (error, response, body) {
777785
assert.equal(error, null)
778786
assert.equal(response.statusCode, 403)
787+
assert.equal(response.statusMessage, 'User Unauthorized')
779788
done()
780789
})
781790
})

0 commit comments

Comments
 (0)