aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMisko Hevery2010-03-22 20:20:05 -0700
committerMisko Hevery2010-03-22 20:20:05 -0700
commita8227086748e37c31c1bb71dec50c96d63c45eef (patch)
tree80979da4e4124b57fa4962baf58bb326964b658e /test
parent7c87c17d08dbba318af1a149c0bbedb696b03458 (diff)
downloadangular.js-a8227086748e37c31c1bb71dec50c96d63c45eef.tar.bz2
rudementary event bind and trigger for jqlite
Diffstat (limited to 'test')
-rw-r--r--test/directivesSpec.js7
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);
});
});