aboutsummaryrefslogtreecommitdiffstats
path: root/test/directivesSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/directivesSpec.js')
-rw-r--r--test/directivesSpec.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/directivesSpec.js b/test/directivesSpec.js
index 341e9031..0e99a63f 100644
--- a/test/directivesSpec.js
+++ b/test/directivesSpec.js
@@ -195,6 +195,20 @@ describe("directives", function(){
});
});
+
+ describe('ng:submit', function() {
+ it('should get called on form submit', function() {
+ var scope = compile('<form action="" ng:submit="submitted = true">' +
+ '<input id="submit" type="submit"/>' +
+ '</form>');
+ scope.$eval();
+ expect(scope.submitted).not.toBeDefined();
+
+ browserTrigger(element.children()[0]);
+ expect(scope.submitted).toEqual(true);
+ });
+ });
+
it('should ng:class', function(){
var scope = compile('<div class="existing" ng:class="[\'A\', \'B\']"></div>');
scope.$eval();