diff options
| author | Misko Hevery | 2012-01-06 18:10:47 -0800 | 
|---|---|---|
| committer | Misko Hevery | 2012-01-10 22:27:00 -0800 | 
| commit | 5143e7bf065a3cbdf8400cf095b653d51bc83b8f (patch) | |
| tree | 980149c365d4cb5586d27975d26366a25ff7be6a /docs/content/guide/dev_guide.forms.ngdoc | |
| parent | afd25446d23f24872eb20ac79c8fbd2cff203ef0 (diff) | |
| download | angular.js-5143e7bf065a3cbdf8400cf095b653d51bc83b8f.tar.bz2 | |
feat(module): new module loader
Diffstat (limited to 'docs/content/guide/dev_guide.forms.ngdoc')
| -rw-r--r-- | docs/content/guide/dev_guide.forms.ngdoc | 14 | 
1 files changed, 6 insertions, 8 deletions
diff --git a/docs/content/guide/dev_guide.forms.ngdoc b/docs/content/guide/dev_guide.forms.ngdoc index db2f88cd..b4e37abd 100644 --- a/docs/content/guide/dev_guide.forms.ngdoc +++ b/docs/content/guide/dev_guide.forms.ngdoc @@ -516,9 +516,8 @@ function LoginController() {  }  describe('LoginController', function() { -  it('should disable login button when form is invalid', function() { -    var scope = angular.module.ng.$rootScope.Scope(); -    var loginController = scope.$new(LoginController); +  it('should disable login button when form is invalid', inject(function($rootScope) { +    var loginController = $rootScope.$new(LoginController);      // In production the 'loginForm' form instance gets set from the view,      // but in unit-test we have to set it manually. @@ -533,7 +532,7 @@ describe('LoginController', function() {      // Now simulate a valid form      loginController.loginForm.$emit('$valid', 'MyReason');      expect(loginController.disableLogin()).toBe(false); -  }); +  }));  });  </pre> @@ -569,9 +568,8 @@ function LoginController(){  }  describe('LoginController', function() { -  it('should disable login button when form is invalid', function() { -    var scope = angular.module.ng.$rootScope.Scope(); -    var loginController = scope.$new(LoginController); +  it('should disable login button when form is invalid', inject(function($rootScope) { +    var loginController = $rootScope.$new(LoginController);      var input = angular.element('<input>');      // In production the 'loginForm' form instance gets set from the view, @@ -609,7 +607,7 @@ describe('LoginController', function() {      loginController.password = 'abcdef'; // should be valid      scope.$digest();      expect(loginController.loginForm.password.$valid).toBe(true); -  }); +  }));  });  </pre>  | 
