@@ -583,6 +583,29 @@ describe('matchesQuery', function () {
583
583
expect ( matchesQuery ( message , q ) ) . toBe ( false ) ;
584
584
} ) ;
585
585
586
+ it ( 'should support containedIn with array of pointers' , ( ) => {
587
+ const message = {
588
+ id : new Id ( 'Message' , 'O2' ) ,
589
+ profiles : [ pointer ( 'Profile' , 'yeahaw' ) , pointer ( 'Profile' , 'yes' ) ] ,
590
+ } ;
591
+
592
+ let q = new Parse . Query ( 'Message' ) ;
593
+ q . containedIn ( 'profiles' , [
594
+ Parse . Object . fromJSON ( { className : 'Profile' , objectId : 'no' } ) ,
595
+ Parse . Object . fromJSON ( { className : 'Profile' , objectId : 'yes' } ) ,
596
+ ] ) ;
597
+
598
+ expect ( matchesQuery ( message , q ) ) . toBe ( true ) ;
599
+
600
+ q = new Parse . Query ( 'Message' ) ;
601
+ q . containedIn ( 'profiles' , [
602
+ Parse . Object . fromJSON ( { className : 'Profile' , objectId : 'no' } ) ,
603
+ Parse . Object . fromJSON ( { className : 'Profile' , objectId : 'nope' } ) ,
604
+ ] ) ;
605
+
606
+ expect ( matchesQuery ( message , q ) ) . toBe ( false ) ;
607
+ } ) ;
608
+
586
609
it ( 'should support notContainedIn with pointers' , ( ) => {
587
610
let message = {
588
611
id : new Id ( 'Message' , 'O1' ) ,
0 commit comments