diff options
Diffstat (limited to 'test/ng')
| -rw-r--r-- | test/ng/filter/filterSpec.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ng/filter/filterSpec.js b/test/ng/filter/filterSpec.js index 0bb48704..7679136a 100644 --- a/test/ng/filter/filterSpec.js +++ b/test/ng/filter/filterSpec.js @@ -70,6 +70,17 @@ describe('Filter: filter', function() { }); + it('should support deep predicate objects', function() { + var items = [{person: {name: 'John'}}, + {person: {name: 'Rita'}}, + {person: {name: 'Billy'}}, + {person: {name: 'Joan'}}]; + expect(filter(items, {person: {name: 'Jo'}}).length).toBe(2); + expect(filter(items, {person: {name: 'Jo'}})).toEqual([ + {person: {name: 'John'}}, {person: {name: 'Joan'}}]); + }); + + it('should match any properties for given "$" property', function() { var items = [{first: 'tom', last: 'hevery'}, {first: 'adam', last: 'hevery', alias: 'tom', done: false}, |
