From 8eb1503791c4bd62e942983ef27872da65a078bc Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Mon, 29 Jul 2024 18:06:50 -0700 Subject: [PATCH] update tests --- .../tests/enhancements/with-policy/field-validation.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/tests/enhancements/with-policy/field-validation.test.ts b/tests/integration/tests/enhancements/with-policy/field-validation.test.ts index 144bf0be6..66eb77dd9 100644 --- a/tests/integration/tests/enhancements/with-policy/field-validation.test.ts +++ b/tests/integration/tests/enhancements/with-policy/field-validation.test.ts @@ -934,8 +934,8 @@ describe('Model-level validation', () => { x Int y Int - @@validate(x == null || !(x <= 0)) - @@validate(y != null && !(y > 1)) + @@validate(x == null || x > 0) + @@validate(y != null && y <= 1) } `, { enhancements: ['validation'] } @@ -948,7 +948,7 @@ describe('Model-level validation', () => { await expect(db.model.create({ data: { id: 1, x: 0, y: 0 } })).toBeRejectedByPolicy(); await expect(db.model.create({ data: { id: 1, x: 1, y: 0 } })).toResolveTruthy(); - await expect(db.model.update({ where: { id: 1 }, data: {} })).toBeRejectedByPolicy(); + await expect(db.model.update({ where: { id: 1 }, data: {} })).toResolveTruthy(); await expect(db.model.update({ where: { id: 1 }, data: { y: 2 } })).toBeRejectedByPolicy(); await expect(db.model.update({ where: { id: 1 }, data: { y: 1 } })).toResolveTruthy(); await expect(db.model.update({ where: { id: 1 }, data: { x: 2, y: 1 } })).toResolveTruthy();