2023-03-10 14:53:35 +03:00
|
|
|
const {agentProvider, matchers, mockManager} = require('../../utils/e2e-framework');
|
2022-05-23 09:29:32 +03:00
|
|
|
const {anyString, anyEtag} = matchers;
|
|
|
|
|
|
|
|
describe('Members .well-known', function () {
|
|
|
|
let membersAgent;
|
|
|
|
|
|
|
|
before(async function () {
|
|
|
|
const agents = await agentProvider.getAgentsForMembers();
|
|
|
|
membersAgent = agents.membersAgent;
|
2023-03-03 16:52:50 +03:00
|
|
|
mockManager.mockMail();
|
|
|
|
});
|
|
|
|
|
|
|
|
after(function () {
|
|
|
|
mockManager.restore();
|
2022-05-23 09:29:32 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
describe('GET /jwks.json', function () {
|
|
|
|
it('should return a JWKS', async function () {
|
|
|
|
await membersAgent
|
|
|
|
.get('/.well-known/jwks.json')
|
|
|
|
.expectStatus(200)
|
|
|
|
.matchBodySnapshot({
|
|
|
|
keys: [{
|
|
|
|
kid: anyString,
|
|
|
|
n: anyString
|
|
|
|
}]
|
|
|
|
})
|
|
|
|
.matchHeaderSnapshot({
|
|
|
|
etag: anyEtag
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|