mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Rename UnsupportedHttpError into BadRequestError.
This commit is contained in:
committed by
Joachim Van Herwegen
parent
03ffaaed43
commit
af8f1976cd
@@ -2,7 +2,7 @@ import { GetOperationHandler } from '../../../../src/ldp/operations/GetOperation
|
||||
import type { Operation } from '../../../../src/ldp/operations/Operation';
|
||||
import type { Representation } from '../../../../src/ldp/representation/Representation';
|
||||
import type { ResourceStore } from '../../../../src/storage/ResourceStore';
|
||||
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
|
||||
import { NotImplementedHttpError } from '../../../../src/util/errors/NotImplementedHttpError';
|
||||
|
||||
describe('A GetOperationHandler', (): void => {
|
||||
const store = {
|
||||
@@ -13,7 +13,7 @@ describe('A GetOperationHandler', (): void => {
|
||||
|
||||
it('only supports GET operations.', async(): Promise<void> => {
|
||||
await expect(handler.canHandle({ method: 'GET' } as Operation)).resolves.toBeUndefined();
|
||||
await expect(handler.canHandle({ method: 'POST' } as Operation)).rejects.toThrow(UnsupportedHttpError);
|
||||
await expect(handler.canHandle({ method: 'POST' } as Operation)).rejects.toThrow(NotImplementedHttpError);
|
||||
});
|
||||
|
||||
it('returns the representation from the store with the correct response.', async(): Promise<void> => {
|
||||
|
||||
Reference in New Issue
Block a user