diff options
| author | Misko Hevery | 2011-04-19 13:50:15 -0700 |
|---|---|---|
| committer | Misko Hevery | 2011-06-08 15:21:33 -0700 |
| commit | 91a34a7027caf0a3f0f4bdaf6649fb6cf479bba8 (patch) | |
| tree | 45cdf78438e1ec63cdaeaa927ec89d6a621cc9da /test/ParserSpec.js | |
| parent | af285dd370aa1b6779bf67ac3bdc19da512aaac5 (diff) | |
| download | angular.js-91a34a7027caf0a3f0f4bdaf6649fb6cf479bba8.tar.bz2 | |
remove ng:format=index
Diffstat (limited to 'test/ParserSpec.js')
| -rw-r--r-- | test/ParserSpec.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/ParserSpec.js b/test/ParserSpec.js index 641420cb..d2a1c5ba 100644 --- a/test/ParserSpec.js +++ b/test/ParserSpec.js @@ -405,9 +405,14 @@ describe('parser', function() { }); it('should delegate arguments', function(){ - var index = parser('index:objs').formatter()(); - expect(index.format({objs:['A','B']}, 'B')).toEqual('1'); - expect(index.parse({objs:['A','B']}, '1')).toEqual('B'); + angularFormatter.myArgs = { + parse: function(a, b){ return [a, b]; }, + format: function(a, b){ return [a, b]; } + }; + var myArgs = parser('myArgs:objs').formatter()(); + expect(myArgs.format({objs:'B'}, 'A')).toEqual(['A', 'B']); + expect(myArgs.parse({objs:'D'}, 'C')).toEqual(['C', 'D']); + delete angularFormatter.myArgs; }); }); |
