diff options
| author | Misko Hevery | 2011-02-07 15:29:56 -0800 |
|---|---|---|
| committer | Misko Hevery | 2011-02-16 00:49:15 -0500 |
| commit | 23b255a8b7481ff5c06004b3558c07f981c42276 (patch) | |
| tree | 57e612f658c9f8903d93a28e9095590178e2ce3a /test/ValidatorsSpec.js | |
| parent | e2154cbc0b9265bea04ce328879d4e9bf1c67c51 (diff) | |
| download | angular.js-23b255a8b7481ff5c06004b3558c07f981c42276.tar.bz2 | |
remove $init on scope from applying compilation template
Closes #40
Diffstat (limited to 'test/ValidatorsSpec.js')
| -rw-r--r-- | test/ValidatorsSpec.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/test/ValidatorsSpec.js b/test/ValidatorsSpec.js index 60d20418..65b93133 100644 --- a/test/ValidatorsSpec.js +++ b/test/ValidatorsSpec.js @@ -9,7 +9,7 @@ describe('ValidatorTest', function(){ }; var scope = compile('<input name="name" ng:validate="myValidator:\'hevery\'"/>'); scope.name = 'misko'; - scope.$init(); + scope.$eval(); assertEquals('misko', validator.first); assertEquals('hevery', validator.last); expect(validator._this.$id).toEqual(scope.$id); @@ -99,7 +99,6 @@ describe('ValidatorTest', function(){ jqLite(document.body).append(self.$element); self.$element.data('$validate', noop); self.$root = self; - self.$init(); }); afterEach(function(){ @@ -110,7 +109,6 @@ describe('ValidatorTest', function(){ var value, fn; var scope = compile('<input type="text" name="name" ng:validate="asynchronous:asyncFn"/>'); jqLite(document.body).append(scope.$element); - scope.$init(); var input = scope.$element; scope.asyncFn = function(v,f){ value=v; fn=f; @@ -155,7 +153,6 @@ describe('ValidatorTest', function(){ scope.asyncFn = jasmine.createSpy(); scope.updateFn = jasmine.createSpy(); scope.name = 'misko'; - scope.$init(); scope.$eval(); expect(scope.asyncFn).wasCalledWith('misko', scope.asyncFn.mostRecentCall.args[1]); assertTrue(scope.$element.hasClass('ng-input-indicator-wait')); |
