Skip to content

Commit

Permalink
Update packages/kit/test/apps/basics/test/test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed Dec 13, 2023
1 parent 7a5e1d4 commit 56a28f0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/kit/test/apps/basics/test/test.js
Expand Up @@ -1238,18 +1238,15 @@ test.describe('Actions', () => {
expect(error.message).toBe('Actions expect form-encoded data (received application/json)');
expect(response.status()).toBe(415);
});

test('submitting to a form action that does not exists, should return http status code 404', async ({
baseURL,
page
}) => {
const randomActionName = 'some-random-action';

const body = new FormData();
body.append('foo', 'bar');

const response = await page.request.fetch(`${baseURL}/actions/enhance?/${randomActionName}`, {
method: 'POST',
body,
body: 'irrelevant',
headers: {
Origin: `${baseURL}`
}
Expand Down

0 comments on commit 56a28f0

Please sign in to comment.