File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -1548,6 +1548,34 @@ describe('schemas', () => {
1548
1548
} ) ;
1549
1549
} ) ;
1550
1550
1551
+ it ( 'can query with include and CLP (issue #2005)' , ( done ) => {
1552
+ setPermissionsOnClass ( 'AnotherObject' , {
1553
+ get : { "*" : true } ,
1554
+ find : { } ,
1555
+ create : { '*' : true } ,
1556
+ update : { '*' : true } ,
1557
+ delete : { '*' : true } ,
1558
+ addField :{ '*' : true }
1559
+ } ) . then ( ( ) => {
1560
+ let obj = new Parse . Object ( 'AnObject' ) ;
1561
+ let anotherObject = new Parse . Object ( 'AnotherObject' ) ;
1562
+ return obj . save ( {
1563
+ anotherObject
1564
+ } )
1565
+ } ) . then ( ( ) => {
1566
+ let query = new Parse . Query ( 'AnObject' ) ;
1567
+ query . include ( 'anotherObject' ) ;
1568
+ return query . find ( ) ;
1569
+ } ) . then ( ( res ) => {
1570
+ expect ( res . length ) . toBe ( 1 ) ;
1571
+ expect ( res [ 0 ] . get ( 'anotherObject' ) ) . not . toBeUndefined ( ) ;
1572
+ done ( ) ;
1573
+ } ) . catch ( ( err ) => {
1574
+ jfail ( err ) ;
1575
+ done ( ) ;
1576
+ } )
1577
+ } ) ;
1578
+
1551
1579
it ( 'can add field as master (issue #1257)' , ( done ) => {
1552
1580
setPermissionsOnClass ( 'AClass' , {
1553
1581
'addField' : { }
You can’t perform that action at this time.
0 commit comments