@@ -583,6 +583,29 @@ describe('matchesQuery', function () {
583583 expect ( matchesQuery ( message , q ) ) . toBe ( false ) ;
584584 } ) ;
585585
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+
586609 it ( 'should support notContainedIn with pointers' , ( ) => {
587610 let message = {
588611 id : new Id ( 'Message' , 'O1' ) ,
0 commit comments