Skip to content

Commit 2cabdf1

Browse files
kjetilkrubensworks
authored andcommitted
Test for a configured originsAllowed
1 parent 85dfa38 commit 2cabdf1

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

test/integration/authentication-oidc-test.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,23 @@ describe('Authentication API (OIDC)', () => {
227227
})
228228
})
229229

230+
// Configuration for originsAllowed
231+
describe('without that cookie but with globally configured origin', () => {
232+
let response
233+
before(done => {
234+
alice.get('/')
235+
.set('Origin', 'https://test.apps.solid.invalid')
236+
.end((err, res) => {
237+
response = res
238+
done(err)
239+
})
240+
})
241+
242+
it('should return a 200', () => {
243+
expect(response).to.have.property('status', 200)
244+
})
245+
})
246+
230247
// Fail 403 Origin Unauthorized
231248
describe('without that cookie and a matching origin', () => {
232249
let response

test/resources/config/defaults.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict'
2+
3+
module.exports = {
4+
'originsAllowed': ['https://test.apps.solid.invalid']
5+
}

0 commit comments

Comments
 (0)