diff options
| author | Misko Hevery | 2012-01-13 14:19:10 -0800 |
|---|---|---|
| committer | Misko Hevery | 2012-01-13 14:28:43 -0800 |
| commit | 5cdfe45aa3e50fabad44009c1b8511253c6e4915 (patch) | |
| tree | eb921be6b173d5fd3a9cd1f0a95b5e1cace37fd8 /test/InjectorSpec.js | |
| parent | 16a40c626fc3da688596928afa028a596204a683 (diff) | |
| download | angular.js-5cdfe45aa3e50fabad44009c1b8511253c6e4915.tar.bz2 | |
feat(module): add runtime block
Diffstat (limited to 'test/InjectorSpec.js')
| -rw-r--r-- | test/InjectorSpec.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/InjectorSpec.js b/test/InjectorSpec.js index 4817dc32..c6e9f178 100644 --- a/test/InjectorSpec.js +++ b/test/InjectorSpec.js @@ -247,6 +247,18 @@ describe('injector', function() { expect(log).toEqual('abc'); }); + it('should execute runBlocks after injector creation', function() { + var log = ''; + angular.module('a', [], function(){ log += 'a'; }).run(function() { log += 'A'; }); + angular.module('b', ['a'], function(){ log += 'b'; }).run(function() { log += 'B'; }); + createInjector([ + 'b', + valueFn(function() { log += 'C'; }), + [valueFn(function() { log += 'D'; })] + ]); + expect(log).toEqual('abABCD'); + }); + describe('$provide', function() { describe('value', function() { it('should configure $provide values', function() { |
