fix: Make SimpleResourceStore behaviour closer to expected

This commit is contained in:
Joachim Van Herwegen
2020-08-07 11:51:54 +02:00
parent 4403421c49
commit 011822e859
4 changed files with 82 additions and 7 deletions

View File

@@ -11,7 +11,7 @@ describe('A SimpleDeleteOperationHandler', (): void => {
store.deleteResource = jest.fn(async(): Promise<void> => {});
});
it('only supports GET operations.', async(): Promise<void> => {
it('only supports DELETE operations.', async(): Promise<void> => {
await expect(handler.canHandle({ method: 'DELETE' } as Operation)).resolves.toBeUndefined();
await expect(handler.canHandle({ method: 'GET' } as Operation)).rejects.toThrow(UnsupportedHttpError);
});