diff options
| author | Igor Minar | 2013-12-31 01:24:41 -0800 | 
|---|---|---|
| committer | Igor Minar | 2013-12-31 01:24:41 -0800 | 
| commit | 07084e1c8bd4efa28b3f02aea353640af0cf37d6 (patch) | |
| tree | 36dee780c2f0060d688514a26fa6f0352aa4bc4e /test/auto | |
| parent | 186a5912288acfff0ee59dae29af83c37c987921 (diff) | |
| download | angular.js-07084e1c8bd4efa28b3f02aea353640af0cf37d6.tar.bz2 | |
test(injector): add missing test for #5577
Add a missing test for fix that was merged via #5577
Diffstat (limited to 'test/auto')
| -rw-r--r-- | test/auto/injectorSpec.js | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/test/auto/injectorSpec.js b/test/auto/injectorSpec.js index dcf01d3c..a70cd763 100644 --- a/test/auto/injectorSpec.js +++ b/test/auto/injectorSpec.js @@ -74,6 +74,17 @@ describe('injector', function() {    }); +  it('should not corrupt the cache when an object fails to get instantiated', function() { +    expect(function() { +      injector.get('idontexist'); +    }).toThrowMinErr("$injector", "unpr", "Unknown provider: idontexistProvider <- idontexist"); + +    expect(function() { +      injector.get('idontexist'); +    }).toThrowMinErr("$injector", "unpr", "Unknown provider: idontexistProvider <- idontexist"); +  }); + +    it('should provide path to the missing provider', function() {      providers('a', function(idontexist) {return 1;});      providers('b', function(a) {return 2;}); | 
