Skip to content

Commit

Permalink
test(injector): add missing test for angular#5577
Browse files Browse the repository at this point in the history
Add a missing test for fix that was merged via angular#5577
  • Loading branch information
IgorMinar authored and jamesdaily committed Jan 27, 2014
1 parent effb513 commit 0a35681
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 0a35681

Please sign in to comment.