Skip to content

Commit

Permalink
fix: add test for disallowed localizedVersions
Browse files Browse the repository at this point in the history
  • Loading branch information
harnyk committed Oct 3, 2024
1 parent 1cd4c40 commit 46d6636
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions registry/tests/templates.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,14 @@ describe(`Tests ${example.url}`, () => {

await req.delete(example.url + example.correctLocalized.name).expect(204);
});

it.only('should not allow to pass localizedVersions to the PATCH request', async () => {
await req.post(example.url).send(example.correct).expect(200);
await req
.patch(example.url + example.correct.name)
.send(_.omit(example.correctLocalized, 'name'))
.expect(422, '"localizedVersions" is not allowed');
});
});

describe('Delete', () => {
Expand Down

0 comments on commit 46d6636

Please sign in to comment.