diff options
| author | Misko Hevery | 2011-11-04 12:33:01 -0700 |
|---|---|---|
| committer | Misko Hevery | 2011-11-14 20:31:14 -0800 |
| commit | a87f2fb9e4d65ac5d260e914b5e31aa0e0f47b2c (patch) | |
| tree | 93e69475affd24ef5b16c68e47d1476bc37787a7 /test/service | |
| parent | c27aba4354c69c4a67fab587a59a8079cc9edc91 (diff) | |
| download | angular.js-a87f2fb9e4d65ac5d260e914b5e31aa0e0f47b2c.tar.bz2 | |
refactor(mock): moved mocks into its own module
Diffstat (limited to 'test/service')
| -rw-r--r-- | test/service/filter/orderBySpec.js | 15 | ||||
| -rw-r--r-- | test/service/logSpec.js | 2 |
2 files changed, 7 insertions, 10 deletions
diff --git a/test/service/filter/orderBySpec.js b/test/service/filter/orderBySpec.js index f59fad55..5c117891 100644 --- a/test/service/filter/orderBySpec.js +++ b/test/service/filter/orderBySpec.js @@ -12,18 +12,15 @@ describe('Filter: orderBy', function() { }); it('shouldSortArrayInReverse', function() { - assertJsonEquals([{a:15},{a:2}], orderBy([{a:15},{a:2}], 'a', true)); - assertJsonEquals([{a:15},{a:2}], orderBy([{a:15},{a:2}], 'a', "T")); - assertJsonEquals([{a:15},{a:2}], orderBy([{a:15},{a:2}], 'a', "reverse")); + expect(orderBy([{a:15}, {a:2}], 'a', true)).toEqualData([{a:15}, {a:2}]); + expect(orderBy([{a:15}, {a:2}], 'a', "T")).toEqualData([{a:15}, {a:2}]); + expect(orderBy([{a:15}, {a:2}], 'a', "reverse")).toEqualData([{a:15}, {a:2}]); }); it('should sort array by predicate', function() { - assertJsonEquals([{a:2, b:1},{a:15, b:1}], - orderBy([{a:15, b:1},{a:2, b:1}], ['a', 'b'])); - assertJsonEquals([{a:2, b:1},{a:15, b:1}], - orderBy([{a:15, b:1},{a:2, b:1}], ['b', 'a'])); - assertJsonEquals([{a:15, b:1},{a:2, b:1}], - orderBy([{a:15, b:1},{a:2, b:1}], ['+b', '-a'])); + expect(orderBy([{a:15, b:1}, {a:2, b:1}], ['a', 'b'])).toEqualData([{a:2, b:1}, {a:15, b:1}]); + expect(orderBy([{a:15, b:1}, {a:2, b:1}], ['b', 'a'])).toEqualData([{a:2, b:1}, {a:15, b:1}]); + expect(orderBy([{a:15, b:1}, {a:2, b:1}], ['+b', '-a'])).toEqualData([{a:15, b:1}, {a:2, b:1}]); }); it('should use function', function() { diff --git a/test/service/logSpec.js b/test/service/logSpec.js index 93e705a9..ee250b66 100644 --- a/test/service/logSpec.js +++ b/test/service/logSpec.js @@ -13,7 +13,7 @@ describe('$log', function() { $window = {}; logger = ''; $provide.service('$log', $LogProvider); - $provide.value('$exceptionHandler', rethrow); + $provide.value('$exceptionHandler', angular.mock.rethrow); $provide.value('$window', $window); })); |
