mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Full rework of account management
Complete rewrite of the account management and related systems. Makes the architecture more modular, allowing for easier extensions and configurations.
This commit is contained in:
17
test/unit/identity/interaction/OidcControlHandler.test.ts
Normal file
17
test/unit/identity/interaction/OidcControlHandler.test.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { OidcControlHandler } from '../../../../src/identity/interaction/OidcControlHandler';
|
||||
|
||||
describe('An OidcControlHandler', (): void => {
|
||||
const handler = new OidcControlHandler({ key: {
|
||||
getPath: jest.fn().mockReturnValue('http://example.com/foo/'),
|
||||
matchPath: jest.fn().mockReturnValue(true),
|
||||
}});
|
||||
|
||||
it('returns results if there is an OIDC interaction.', async(): Promise<void> => {
|
||||
await expect(handler.handle({ oidcInteraction: {}} as any))
|
||||
.resolves.toEqual({ json: { key: 'http://example.com/foo/' }});
|
||||
});
|
||||
|
||||
it('returns an empty object if there is no OIDC interaction.', async(): Promise<void> => {
|
||||
await expect(handler.handle({ } as any)).resolves.toEqual({ json: { }});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user