Skip to content

Commit 9bf1000

Browse files
committed
test: fix breaking tests
1 parent 949d207 commit 9bf1000

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

tests/request_validator.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const BASE_URL = new URL('./tmp/', import.meta.url)
2424

2525
test.group('Request validator', () => {
2626
test('perform validation on request data using request validator', async ({ assert }) => {
27-
assert.plan(1)
27+
assert.plan(2)
2828

2929
const ignitor = new IgnitorFactory()
3030
.withCoreConfig()
@@ -61,7 +61,7 @@ test.group('Request validator', () => {
6161
{
6262
field: 'username',
6363
message: 'The username field must be defined',
64-
rule: 'validations.required',
64+
rule: 'required',
6565
},
6666
])
6767
}
@@ -171,7 +171,7 @@ test.group('Request validator', () => {
171171
})
172172

173173
test('pass metadata to validator', async ({ assert }) => {
174-
assert.plan(1)
174+
assert.plan(2)
175175

176176
const ignitor = new IgnitorFactory()
177177
.withCoreConfig()
@@ -221,7 +221,7 @@ test.group('Request validator', () => {
221221
})
222222

223223
test('use custom messages provider', async ({ assert, cleanup }) => {
224-
assert.plan(1)
224+
assert.plan(2)
225225

226226
const ignitor = new IgnitorFactory()
227227
.withCoreConfig()
@@ -267,16 +267,16 @@ test.group('Request validator', () => {
267267
assert.deepEqual(error.messages, [
268268
{
269269
field: 'username',
270-
message: 'The selected username is invalid',
271-
rule: 'notIn',
270+
message: 'The value is missing',
271+
rule: 'required',
272272
},
273273
])
274274
}
275275
}
276276
})
277277

278278
test('use custom error reporter', async ({ assert, cleanup }) => {
279-
assert.plan(1)
279+
assert.plan(2)
280280

281281
const ignitor = new IgnitorFactory()
282282
.withCoreConfig()

0 commit comments

Comments
 (0)