diff options
Diffstat (limited to 'test/auto/injectorSpec.js')
| -rw-r--r-- | test/auto/injectorSpec.js | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/test/auto/injectorSpec.js b/test/auto/injectorSpec.js index f010fc91..5c186cf1 100644 --- a/test/auto/injectorSpec.js +++ b/test/auto/injectorSpec.js @@ -295,6 +295,24 @@ describe('injector', function() {      });      describe('$provide', function() { + +      it('should throw an exception if we try to register a service called "hasOwnProperty"', function() { +        createInjector([function($provide) { +          expect(function() { +            $provide.provider('hasOwnProperty', function() {  }); +          }).toThrowMinErr('ng', 'badname'); +        }]); +      }); + +      it('should throw an exception if we try to register a constant called "hasOwnProperty"', function() { +        createInjector([function($provide) { +          expect(function() { +            $provide.constant('hasOwnProperty', {}); +          }).toThrowMinErr('ng', 'badname'); +        }]); +      }); + +        describe('constant', function() {          it('should create configuration injectable constants', function() {            var log = []; | 
