diff options
| author | Igor Minar | 2011-07-01 17:37:01 -0700 | 
|---|---|---|
| committer | Igor Minar | 2011-07-01 18:17:54 -0700 | 
| commit | 30bd04feaa057c77fef031697b82721a7feb2c74 (patch) | |
| tree | 5baf6b48c9c25262c17c2eef03788592f4b98bc8 /test/angular-mocksSpec.js | |
| parent | 25a77c58c13e4df37c29245bec0f7716e20f3c15 (diff) | |
| download | angular.js-30bd04feaa057c77fef031697b82721a7feb2c74.tar.bz2 | |
fix:exceptionHandler mock: should not specify dependencies
also added a test for this mock service
Diffstat (limited to 'test/angular-mocksSpec.js')
| -rw-r--r-- | test/angular-mocksSpec.js | 9 | 
1 files changed, 9 insertions, 0 deletions
| 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'); +    }); +  });  }); | 
