test(injector): add missing test for #5577

Add a missing test for fix that was merged via #5577
This commit is contained in:
Igor Minar 2013-12-31 01:24:41 -08:00
parent 186a591228
commit 07084e1c8b

View file

@ -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;});