Skip to content

Commit

Permalink
feat(command): small adjust in controller test template
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed May 27, 2024
1 parent 9dbf2c0 commit 4c81195
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/database",
"version": "4.60.0",
"version": "4.61.0",
"description": "The Athenna database handler for SQL/NoSQL.",
"license": "MIT",
"author": "João Lenon <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/MakeCrudCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class MakeCrudCommand extends BaseCommand {

@Option({
default: false,
signature: '--is-mongo',
signature: '--mongo',
description:
'Define if CRUD will use Mongo as database. Migration will be skipped and "id" will be defined as string.'
})
Expand Down
4 changes: 3 additions & 1 deletion templates/crud-controller-test.edge
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ export default class {{ namePascal }} extends BaseHttpTest {

@Test()
public async shouldThrowNotFoundExceptionIfUpdatingA{{ crudNamePascal }}WithAnIdThatDoesNotExist({ request }: Context) {
const response = await request.put('/{{ crudNameLowerPlural }}/not-found')
const response = await request.put('/{{ crudNameLowerPlural }}/not-found', {
body: { {{{ updateBody }}} }
})

response.assertStatusCode(404)
}
Expand Down

0 comments on commit 4c81195

Please sign in to comment.