mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-23 13:46:45 +02:00
feat: add test that verifies header precedence
This commit is contained in:
parent
d74929958d
commit
fccbd18a04
@ -57,3 +57,12 @@ test('should allow requests to /api/client/features with x-unleash-auth header',
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200);
|
||||
});
|
||||
|
||||
test('should use x-unleash-auth if both headers are set', async () => {
|
||||
await app.request
|
||||
.get('/api/client/features')
|
||||
.set('x-unleash-auth', clientToken.secret)
|
||||
.set('authorization', 'gibberish')
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(200);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user