aboutsummaryrefslogtreecommitdiffstats
path: root/test/directivesSpec.js
diff options
context:
space:
mode:
authorIgor Minar2010-10-22 16:45:56 -0700
committerMisko Hevery2010-10-23 14:22:54 -0700
commitbbd87c9425ae984f632783b1f33f415ec1747ca6 (patch)
treeadff9cc1726f5892db85bfd787e824b8e10ea09a /test/directivesSpec.js
parent64063b5d41c5ebac2835a83d9da40974da4d4820 (diff)
downloadangular.js-bbd87c9425ae984f632783b1f33f415ec1747ca6.tar.bz2
simplifying ng:click spec
Diffstat (limited to 'test/directivesSpec.js')
-rw-r--r--test/directivesSpec.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/directivesSpec.js b/test/directivesSpec.js
index 86540386..341e9031 100644
--- a/test/directivesSpec.js
+++ b/test/directivesSpec.js
@@ -172,7 +172,7 @@ describe("directives", function(){
});
describe('ng:click', function(){
- it('should fire event', function(){
+ it('should get called on a click', function(){
var scope = compile('<div ng:click="clicked = true"></div>');
scope.$eval();
expect(scope.$get('clicked')).toBeFalsy();
@@ -184,14 +184,14 @@ describe("directives", function(){
it('should stop event propagation', function() {
var scope = compile('<div ng:click="outer = true"><div ng:click="inner = true"></div></div>');
scope.$eval();
- expect(scope.$get('outer')).not.toBeDefined();
- expect(scope.$get('inner')).not.toBeDefined();
+ expect(scope.outer).not.toBeDefined();
+ expect(scope.inner).not.toBeDefined();
- var innerDiv = jqLite(element.children()[0]);
+ var innerDiv = element.children()[0];
browserTrigger(innerDiv, 'click');
- expect(scope.$get('outer')).not.toBeDefined();
- expect(scope.$get('inner')).toEqual(true);
+ expect(scope.outer).not.toBeDefined();
+ expect(scope.inner).toEqual(true);
});
});