aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichał Gołębiowski <m.goleb@gmail.com>2014-12-04 14:43:35 +0100
committerMichał Gołębiowski <m.goleb@gmail.com>2014-12-08 22:39:58 +0100
commitf6302b0b53d61dfe1adbfaf6612be5cbced5bbc1 (patch)
tree2d022973ed69d45edeab202eab6be03a94373e23 /test
parentdd596ccf729b2f39d44b73bc54b53bd41c880146 (diff)
downloadjquery-f6302b0b53d61dfe1adbfaf6612be5cbced5bbc1.tar.gz
jquery-f6302b0b53d61dfe1adbfaf6612be5cbced5bbc1.zip
Attributes: Use the option val hook in select val hook and simplify it
The hook is still defined; not using it could cause issues in IE<11. Also, IE10 no longer throws when value not set but it still doesn't trim the value. IE11 has all those issues fixed; support comments are updated. Fixes gh-1902 Closes gh-1901
Diffstat (limited to 'test')
-rw-r--r--test/unit/attributes.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js
index 69be6abe0..c1f773718 100644
--- a/test/unit/attributes.js
+++ b/test/unit/attributes.js
@@ -1461,6 +1461,11 @@ test( "should not throw at $(option).val() (#14686)", 1, function() {
}
});
+test( "option value not trimmed when setting via parent select", function() {
+ expect( 1 );
+ equal( jQuery( "<select><option> 2</option></select>" ).val( "2" ).val(), "2" );
+});
+
test( "Insignificant white space returned for $(option).val() (#14858)", function() {
expect ( 3 );