diff options
| author | Misko Hevery | 2010-03-22 20:20:05 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-03-22 20:20:05 -0700 |
| commit | a8227086748e37c31c1bb71dec50c96d63c45eef (patch) | |
| tree | 80979da4e4124b57fa4962baf58bb326964b658e /test/directivesSpec.js | |
| parent | 7c87c17d08dbba318af1a149c0bbedb696b03458 (diff) | |
| download | angular.js-a8227086748e37c31c1bb71dec50c96d63c45eef.tar.bz2 | |
rudementary event bind and trigger for jqlite
Diffstat (limited to 'test/directivesSpec.js')
| -rw-r--r-- | test/directivesSpec.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/directivesSpec.js b/test/directivesSpec.js index 447698a3..7e0446ef 100644 --- a/test/directivesSpec.js +++ b/test/directivesSpec.js @@ -12,6 +12,11 @@ describe("directives", function(){ }; }); + afterEach(function(){ + element.remove(); + expect(_(jqCache).size()).toEqual(0); + }); + it("should ng-init", function() { var scope = compile('<div ng-init="a=123"></div>'); expect(scope.get('a')).toEqual(123); @@ -100,7 +105,7 @@ describe("directives", function(){ scope.updateView(); expect(scope.get('clicked')).toBeFalsy(); - jQuery(element.element).click(); + element.click(); expect(scope.get('clicked')).toEqual(true); }); }); |
