From 30bd04feaa057c77fef031697b82721a7feb2c74 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Fri, 1 Jul 2011 17:37:01 -0700 Subject: fix:exceptionHandler mock: should not specify dependencies also added a test for this mock service --- test/angular-mocksSpec.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/angular-mocksSpec.js b/test/angular-mocksSpec.js index dac691b0..c57b35e0 100644 --- a/test/angular-mocksSpec.js +++ b/test/angular-mocksSpec.js @@ -216,4 +216,13 @@ describe('mocks', function(){ }); }); + + describe('$exceptionHandler', function() { + it('should rethrow exceptions', function() { + var rootScope = angular.scope(), + exHandler = rootScope.$service('$exceptionHandler'); + + expect(function() { exHandler('myException') }).toThrow('myException'); + }); + }); }); -- cgit v1.2.3