CommunitySolidServer/test/unit/identity/interaction/routing/AbsolutePathInteractionRoute.test.ts
Joachim Van Herwegen a47f5236ef 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.
2023-10-06 11:04:40 +02:00

18 lines
653 B
TypeScript

import {
AbsolutePathInteractionRoute,
} from '../../../../../src/identity/interaction/routing/AbsolutePathInteractionRoute';
describe('An AbsolutePathInteractionRoute', (): void => {
const path = 'http://example.com/idp/path/';
const route = new AbsolutePathInteractionRoute(path);
it('returns the given path.', async(): Promise<void> => {
expect(route.getPath()).toBe('http://example.com/idp/path/');
});
it('matches a path if it is identical to the stored path.', async(): Promise<void> => {
expect(route.matchPath(path)).toEqual({});
expect(route.matchPath('http://example.com/somewhere/else')).toBeUndefined();
});
});