fix: Return 201 when creating new resources

This commit is contained in:
Joachim Van Herwegen
2021-10-11 09:54:45 +02:00
parent 5613ff9e71
commit 76c87bb56a
12 changed files with 93 additions and 30 deletions

View File

@@ -77,7 +77,8 @@ describe('A Solid server', (): void => {
},
body: '<a:b> <a:b> <a:b>.',
});
expect(res.status).toBe(205);
expect(res.status).toBe(201);
expect(res.headers.get('location')).toBe(url);
});
it('can PUT to resources.', async(): Promise<void> => {
@@ -89,7 +90,8 @@ describe('A Solid server', (): void => {
},
body: '<a:b> <a:b> <a:b>.',
});
expect(res.status).toBe(205);
expect(res.status).toBe(201);
expect(res.headers.get('location')).toBe(url);
});
it('can handle PUT errors.', async(): Promise<void> => {