aboutsummaryrefslogtreecommitdiffstats
path: root/test/widget/formSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2011-10-07 11:27:49 -0700
committerIgor Minar2011-10-11 11:01:46 -0700
commitfd822bdaf9d04e522aaa5400b673f333190abe98 (patch)
tree451cd26d3f7da862692d6c56e6e8f235824c180a /test/widget/formSpec.js
parent4f78fd692c0ec51241476e6be9a4df06cd62fdd6 (diff)
downloadangular.js-fd822bdaf9d04e522aaa5400b673f333190abe98.tar.bz2
chore(formating): clean code to be function() {
Diffstat (limited to 'test/widget/formSpec.js')
-rw-r--r--test/widget/formSpec.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/widget/formSpec.js b/test/widget/formSpec.js
index 7c575c33..7d136dd8 100644
--- a/test/widget/formSpec.js
+++ b/test/widget/formSpec.js
@@ -1,35 +1,35 @@
'use strict';
-describe('form', function(){
+describe('form', function() {
var doc;
- afterEach(function(){
+ afterEach(function() {
dealoc(doc);
});
- it('should attach form to DOM', function(){
+ it('should attach form to DOM', function() {
doc = angular.element('<form>');
var scope = angular.compile(doc)();
expect(doc.data('$form')).toBeTruthy();
});
- it('should prevent form submission', function(){
+ it('should prevent form submission', function() {
var startingUrl = '' + window.location;
doc = angular.element('<form name="myForm"><input type=submit val=submit>');
var scope = angular.compile(doc)();
browserTrigger(doc.find('input'));
waitsFor(
- function(){ return true; },
+ function() { return true; },
'let browser breath, so that the form submision can manifest itself', 10);
- runs(function(){
+ runs(function() {
expect('' + window.location).toEqual(startingUrl);
});
});
- it('should publish form to scope', function(){
+ it('should publish form to scope', function() {
doc = angular.element('<form name="myForm">');
var scope = angular.compile(doc)();
expect(scope.myForm).toBeTruthy();
@@ -38,7 +38,7 @@ describe('form', function(){
});
- it('should have ng-valide/ng-invalid style', function(){
+ it('should have ng-valide/ng-invalid style', function() {
doc = angular.element('<form name="myForm"><input type=text ng:model=text required>');
var scope = angular.compile(doc)();
scope.text = 'misko';
@@ -54,7 +54,7 @@ describe('form', function(){
});
- it('should chain nested forms', function(){
+ it('should chain nested forms', function() {
doc = angular.element('<ng:form name=parent><ng:form name=child><input type=text ng:model=text name=text>');
var scope = angular.compile(doc)();
var parent = scope.parent;
@@ -71,7 +71,7 @@ describe('form', function(){
});
- it('should chain nested forms in repeater', function(){
+ it('should chain nested forms in repeater', function() {
doc = angular.element('<ng:form name=parent>' +
'<ng:form ng:repeat="f in forms" name=child><input type=text ng:model=text name=text>');
var scope = angular.compile(doc)();