mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Make getParentContainer work with query parameters
This commit is contained in:
@@ -19,7 +19,9 @@ describe('A BaseIdentifierStrategy', (): void => {
|
||||
describe('getParentContainer', (): void => {
|
||||
it('returns the parent identifier.', async(): Promise<void> => {
|
||||
expect(strategy.getParentContainer({ path: 'http://example.com/foo/bar' })).toEqual({ path: 'http://example.com/foo/' });
|
||||
expect(strategy.getParentContainer({ path: 'http://example.com/foo//' })).toEqual({ path: 'http://example.com/' });
|
||||
expect(strategy.getParentContainer({ path: 'http://example.com/foo/bar/' })).toEqual({ path: 'http://example.com/foo/' });
|
||||
expect(strategy.getParentContainer({ path: 'http://example.com/foo/bar?q=5' })).toEqual({ path: 'http://example.com/foo/' });
|
||||
});
|
||||
|
||||
it('errors when attempting to get the parent of an unsupported identifier.', async(): Promise<void> => {
|
||||
|
||||
Reference in New Issue
Block a user