Do not validate external

This commit is contained in:
Adria Navarro 2023-09-08 10:22:24 +02:00
parent 93124d804b
commit 3912517f67
1 changed files with 8 additions and 2 deletions

View File

@ -599,8 +599,14 @@ describe.each([
.expect("Content-Type", /json/) .expect("Content-Type", /json/)
.expect(200) .expect(200)
expect(res.body.valid).toBe(false) if (isInternal) {
expect(Object.keys(res.body.errors)).toEqual(["name"]) expect(res.body.valid).toBe(false)
expect(Object.keys(res.body.errors)).toEqual(["name"])
} else {
// Validation for external is not implemented, so it will always return valid
expect(res.body.valid).toBe(true)
expect(Object.keys(res.body.errors)).toEqual([])
}
await assertRowUsage(rowUsage) await assertRowUsage(rowUsage)
await assertQueryUsage(queryUsage) await assertQueryUsage(queryUsage)
}) })