aboutsummaryrefslogtreecommitdiffstats
path: root/test/InjectorSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/InjectorSpec.js')
-rw-r--r--test/InjectorSpec.js12
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() {