diff options
Diffstat (limited to 'test/auto')
| -rw-r--r-- | test/auto/injectorSpec.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/auto/injectorSpec.js b/test/auto/injectorSpec.js index d2a63789..6f84897b 100644 --- a/test/auto/injectorSpec.js +++ b/test/auto/injectorSpec.js @@ -394,6 +394,20 @@ describe('injector', function() { }); + it('should configure $provide using an array', function() { + function Type(PREFIX) { + this.prefix = PREFIX; + }; + Type.prototype.$get = function() { + return this.prefix + 'def'; + }; + expect(createInjector([function($provide) { + $provide.constant('PREFIX', 'abc'); + $provide.provider('value', ['PREFIX', Type]); + }]).get('value')).toEqual('abcdef'); + }); + + it('should configure a set of providers', function() { expect(createInjector([function($provide) { $provide.provider({value: valueFn({$get:Array})}); |
