@@ -57,8 +57,7 @@ describe('Policy tests multiple id fields', () => {
5757 ) . toResolveTruthy ( ) ;
5858 } ) ;
5959
60- // TODO: `future()` support
61- it . skip ( 'multi-id fields id update' , async ( ) => {
60+ it ( 'multi-id fields id update' , async ( ) => {
6261 const db = await createPolicyTestClient (
6362 `
6463 model A {
@@ -70,7 +69,8 @@ describe('Policy tests multiple id fields', () => {
7069
7170 @@allow('read', true)
7271 @@allow('create', value > 0)
73- @@allow('update', value > 0 && future().value > 1)
72+ @@allow('update', value > 0)
73+ @@allow('post-update', value > 1)
7474 }
7575
7676 model B {
@@ -319,8 +319,7 @@ describe('Policy tests multiple id fields', () => {
319319 expect ( await db . c . findUnique ( { where : { id : 1 } } ) ) . toEqual ( expect . objectContaining ( { v : 6 } ) ) ;
320320 } ) ;
321321
322- // TODO: `future()` support
323- it . skip ( 'multi-id fields nested id update' , async ( ) => {
322+ it ( 'multi-id fields nested id update' , async ( ) => {
324323 const db = await createPolicyTestClient (
325324 `
326325 model A {
@@ -333,7 +332,8 @@ describe('Policy tests multiple id fields', () => {
333332
334333 @@allow('read', true)
335334 @@allow('create', value > 0)
336- @@allow('update', value > 0 && future().value > 1)
335+ @@allow('update', value > 0)
336+ @@allow('post-update', value > 1)
337337 }
338338
339339 model B {
@@ -369,7 +369,7 @@ describe('Policy tests multiple id fields', () => {
369369 upsert : {
370370 where : { x_y : { x : '2' , y : 2 } } ,
371371 update : { x : '3' , y : 3 , value : 0 } ,
372- create : { x : '4' , y : '4' , value : 4 } ,
372+ create : { x : '4' , y : 4 , value : 4 } ,
373373 } ,
374374 } ,
375375 } ,
@@ -384,7 +384,7 @@ describe('Policy tests multiple id fields', () => {
384384 upsert : {
385385 where : { x_y : { x : '2' , y : 2 } } ,
386386 update : { x : '3' , y : 3 , value : 3 } ,
387- create : { x : '4' , y : '4' , value : 4 } ,
387+ create : { x : '4' , y : 4 , value : 4 } ,
388388 } ,
389389 } ,
390390 } ,
0 commit comments