Skip to content

Commit c8275b7

Browse files
kjetilkrubensworks
authored andcommitted
Add tests to see if message for 401 is 'Unauthenticated'
1 parent c57dd32 commit c8275b7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/integration/acl-oidc-test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
409409
request.put(options, function (error, response, body) {
410410
assert.equal(error, null)
411411
assert.equal(response.statusCode, 401)
412+
assert.equal(response.statusMessage, 'Unauthenticated')
412413
done()
413414
})
414415
})
@@ -492,6 +493,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
492493
request.head(options, function (error, response, body) {
493494
assert.equal(error, null)
494495
assert.equal(response.statusCode, 401)
496+
assert.equal(response.statusMessage, 'Unauthenticated')
495497
done()
496498
})
497499
})
@@ -501,6 +503,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
501503
request.put(options, function (error, response, body) {
502504
assert.equal(error, null)
503505
assert.equal(response.statusCode, 401)
506+
assert.equal(response.statusMessage, 'Unauthenticated')
504507
done()
505508
})
506509
})
@@ -685,6 +688,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
685688
request.head(options, function (error, response, body) {
686689
assert.equal(error, null)
687690
assert.equal(response.statusCode, 401)
691+
assert.equal(response.statusMessage, 'Unauthenticated')
688692
done()
689693
})
690694
})
@@ -694,6 +698,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
694698
request.put(options, function (error, response, body) {
695699
assert.equal(error, null)
696700
assert.equal(response.statusCode, 401)
701+
assert.equal(response.statusMessage, 'Unauthenticated')
697702
done()
698703
})
699704
})
@@ -788,6 +793,7 @@ describe('ACL with WebID+OIDC over HTTP', function () {
788793
request.put(options, function (error, response, body) {
789794
assert.equal(error, null)
790795
assert.equal(response.statusCode, 401)
796+
assert.equal(response.statusMessage, 'Unauthenticated')
791797
done()
792798
})
793799
})

0 commit comments

Comments
 (0)