aboutsummaryrefslogtreecommitdiffstats
path: root/test/service
diff options
context:
space:
mode:
Diffstat (limited to 'test/service')
-rw-r--r--test/service/filter/orderBySpec.js15
-rw-r--r--test/service/logSpec.js2
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);
}));