diff options
| author | Misko Hevery | 2010-12-01 20:29:54 -0800 |
|---|---|---|
| committer | Misko Hevery | 2010-12-02 22:45:57 -0800 |
| commit | 5a8ad8fe329fc09898ff43a060710265d38393be (patch) | |
| tree | 95058036d40b1dd993e2a9c4094ebd34b2751707 /test/servicesSpec.js | |
| parent | 41d5938883a3d06ffe8a88a51efd8d1896f7d747 (diff) | |
| download | angular.js-5a8ad8fe329fc09898ff43a060710265d38393be.tar.bz2 | |
Closes #170. Corrected the behavior of select when options are ng:repeated
- Delete $postEval method, as it was a hack
Diffstat (limited to 'test/servicesSpec.js')
| -rw-r--r-- | test/servicesSpec.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/servicesSpec.js b/test/servicesSpec.js index 13e61b18..ff90e0a1 100644 --- a/test/servicesSpec.js +++ b/test/servicesSpec.js @@ -17,8 +17,7 @@ describe("service", function(){ }); afterEach(function(){ - if (scope && scope.$element) - scope.$element.remove(); + dealoc(scope); }); @@ -202,7 +201,7 @@ describe("service", function(){ }); it('should update hash before any processing', function(){ - var scope = compile('<div>'); + scope = compile('<div>'); var log = ''; scope.$watch('$location.hash', function(){ log += this.$location.hashPath + ';'; @@ -259,7 +258,7 @@ describe("service", function(){ describe("$invalidWidgets", function(){ it("should count number of invalid widgets", function(){ - var scope = compile('<input name="price" ng:required ng:validate="number"></input>'); + scope = compile('<input name="price" ng:required ng:validate="number"></input>'); jqLite(document.body).append(scope.$element); scope.$init(); expect(scope.$invalidWidgets.length).toEqual(1); @@ -291,8 +290,8 @@ describe("service", function(){ function BookChapter() { this.log = '<init>'; } - var scope = compile('<div></div>').$init(); - var $route = scope.$inject('$route'); + scope = compile('<div></div>').$init(); + $route = scope.$inject('$route'); $route.when('/Book/:book/Chapter/:chapter', {controller: BookChapter, template:'Chapter.html'}); $route.when('/Blank'); $route.onChange(function(){ |
