Skip to content

Commit 4c81195

Browse files
committed
feat(command): small adjust in controller test template
1 parent 9dbf2c0 commit 4c81195

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@athenna/database",
3-
"version": "4.60.0",
3+
"version": "4.61.0",
44
"description": "The Athenna database handler for SQL/NoSQL.",
55
"license": "MIT",
66
"author": "João Lenon <lenon@athenna.io>",

src/commands/MakeCrudCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class MakeCrudCommand extends BaseCommand {
2222

2323
@Option({
2424
default: false,
25-
signature: '--is-mongo',
25+
signature: '--mongo',
2626
description:
2727
'Define if CRUD will use Mongo as database. Migration will be skipped and "id" will be defined as string.'
2828
})

templates/crud-controller-test.edge

+3-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ export default class {{ namePascal }} extends BaseHttpTest {
6161

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

6668
response.assertStatusCode(404)
6769
}

0 commit comments

Comments
 (0)