Prototype: add form elements methods chaining test

This commit is contained in:
Thomas Fuchs 2007-02-10 16:22:56 +00:00
parent 6eca3f0eea
commit 06cf9616f9
1 changed files with 11 additions and 0 deletions

View File

@ -323,6 +323,17 @@
assert(request.url.endsWith("fixtures/empty.js"));
assertEqual("val1=4", Hash.toQueryString(request.options.parameters));
assertEqual("post", request.method);
}},
testFormElementMethodsChaining: function(){ with(this) {
var methods = $w('clear activate disable enable'),
formElements = $('form_getelements').getElements();
methods.each(function(method){
formElements.each(function(element){
var returned = element[method]();
assertIdentical(element, returned);
});
});
}}
}, 'testlog');