aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authortimmywil <tim.willison@thisismedium.com>2011-05-06 13:49:20 -0400
committertimmywil <tim.willison@thisismedium.com>2011-05-06 13:49:20 -0400
commitc72b0f3256672424a193040509ed63c755c805a2 (patch)
tree91e0ec79e60df15d4cc98279feba6141686cd1d3 /test
parentf7f8450041df7c250f04b03cbbcbd2d01025f379 (diff)
downloadjquery-c72b0f3256672424a193040509ed63c755c805a2.tar.gz
jquery-c72b0f3256672424a193040509ed63c755c805a2.zip
Check empty string instead of specified as specified is inconsistent on the name attribute. Fixes #9148.
Diffstat (limited to 'test')
-rw-r--r--test/unit/attributes.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js
index 257d02d09..e01982364 100644
--- a/test/unit/attributes.js
+++ b/test/unit/attributes.js
@@ -144,7 +144,7 @@ test("attr(Hash)", function() {
});
test("attr(String, Object)", function() {
- expect(57);
+ expect(58);
var div = jQuery("div").attr("foo", "bar"),
fail = false;
@@ -164,6 +164,8 @@ test("attr(String, Object)", function() {
equals( jQuery("#name").attr("name"), "something", "Set name attribute" );
jQuery("#name").attr("name", null);
equals( jQuery("#name").attr("name"), undefined, "Remove name attribute" );
+ var $input = jQuery("<input>", { name: "something" });
+ equals( $input.attr("name"), "something", "Check element creation gets/sets the name attribute." );
jQuery("#check2").prop("checked", true).prop("checked", false).attr("checked", true);
equals( document.getElementById("check2").checked, true, "Set checked attribute" );