diff options
| author | Misko Hevery | 2013-05-01 20:55:25 -0400 | 
|---|---|---|
| committer | Misko Hevery | 2013-05-02 15:22:16 -0400 | 
| commit | 80341cb9badd952fdc80094df4123629313b4cc4 (patch) | |
| tree | d2b6a1f4d230de39617622a378c350433c96c7f8 /test/auto | |
| parent | 9956baedd73d5e8d0edd04c9eed368bd3988444b (diff) | |
| download | angular.js-80341cb9badd952fdc80094df4123629313b4cc4.tar.bz2 | |
feat(injector): add has method for querying
Closes #2556
Diffstat (limited to 'test/auto')
| -rw-r--r-- | test/auto/injectorSpec.js | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/test/auto/injectorSpec.js b/test/auto/injectorSpec.js index 6f84897b..8fd03be4 100644 --- a/test/auto/injectorSpec.js +++ b/test/auto/injectorSpec.js @@ -58,6 +58,15 @@ describe('injector', function() {    }); +  it('should allow query names', function() { +    providers('abc', function () { return ''; }); + +    expect(injector.has('abc')).toBe(true); +    expect(injector.has('xyz')).toBe(false); +    expect(injector.has('$injector')).toBe(true); +  }); + +    it('should provide useful message if no provider', function() {      expect(function() {        injector.get('idontexist'); | 
