mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00

Complete rewrite of the account management and related systems. Makes the architecture more modular, allowing for easier extensions and configurations.
18 lines
799 B
TypeScript
18 lines
799 B
TypeScript
import { BaseAccountIdRoute } from '../../../../../src/identity/interaction/account/AccountIdRoute';
|
|
import {
|
|
BaseClientCredentialsIdRoute,
|
|
} from '../../../../../src/identity/interaction/client-credentials/util/ClientCredentialsIdRoute';
|
|
import {
|
|
AbsolutePathInteractionRoute,
|
|
} from '../../../../../src/identity/interaction/routing/AbsolutePathInteractionRoute';
|
|
|
|
describe('A BaseClientCredentialsIdRoute', (): void => {
|
|
it('uses the Credentials ID key.', async(): Promise<void> => {
|
|
const credentialsIdRoute = new BaseClientCredentialsIdRoute(new BaseAccountIdRoute(
|
|
new AbsolutePathInteractionRoute('http://example.com/'),
|
|
));
|
|
expect(credentialsIdRoute.matchPath('http://example.com/123/456/'))
|
|
.toEqual({ accountId: '123', clientCredentialsId: '456' });
|
|
});
|
|
});
|