Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
test(injector): add missing test for #5577
Browse files Browse the repository at this point in the history
Add a missing test for fix that was merged via #5577
  • Loading branch information
IgorMinar committed Dec 31, 2013
1 parent 186a591 commit 07084e1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/auto/injectorSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;});
Expand Down

0 comments on commit 07084e1

Please sign in to comment.