File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -673,7 +673,7 @@ describe('filter', () => {
673
673
expect ( actual ) . toEqual ( expected ) ;
674
674
} )
675
675
676
- it ( 'should support "in" operator on a collection with an array/collection parameter of a strings ' , ( ) => {
676
+ it ( 'should handle collection operator with "in" operator on the item of a simple collection ' , ( ) => {
677
677
const filter = {
678
678
tags : {
679
679
any : {
@@ -685,6 +685,24 @@ describe('filter', () => {
685
685
const actual = buildQuery ( { filter } ) ;
686
686
expect ( actual ) . toEqual ( expected ) ;
687
687
} )
688
+
689
+
690
+ it ( 'should handle collection operator with "or" operator on the item of a simple collection' , ( ) => {
691
+ const filter = {
692
+ tags : {
693
+ any : {
694
+ or : [
695
+ { [ ITEM_ROOT ] : 'tag1' } ,
696
+ { [ ITEM_ROOT ] : 'tag2' } ,
697
+ ]
698
+ }
699
+ }
700
+ } ;
701
+
702
+ const expected = "?$filter=tags/any(tags:((tags eq 'tag1') or (tags eq 'tag2')))" ;
703
+ const actual = buildQuery ( { filter } ) ;
704
+ expect ( actual ) . toEqual ( expected ) ;
705
+ } )
688
706
} ) ;
689
707
690
708
describe ( 'data types' , ( ) => {
You can’t perform that action at this time.
0 commit comments