aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorOleg <markelog@gmail.com>2012-12-28 18:56:29 +0400
committerOleg <markelog@gmail.com>2012-12-28 18:56:29 +0400
commitd3d8ed443cedf9bba3af4fd71744cceb0ace0c93 (patch)
treea5bc07d70d11c7d18e32cea53b21713e4123178c /test/unit
parentf193acf3a1f6838f8f6b90d4038e3cd9bb89f1ba (diff)
downloadjquery-d3d8ed443cedf9bba3af4fd71744cceb0ace0c93.tar.gz
jquery-d3d8ed443cedf9bba3af4fd71744cceb0ace0c93.zip
Add comments for optgroup and option elements in wrapMap
Add tests for optgroup element
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/manipulation.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js
index e88f71fda..8054fd075 100644
--- a/test/unit/manipulation.js
+++ b/test/unit/manipulation.js
@@ -395,7 +395,7 @@ var testAppendForObject = function( valueObj, isFragment ) {
var testAppend = function( valueObj ) {
- expect( 61 );
+ expect( 63 );
testAppendForObject( valueObj, false );
testAppendForObject( valueObj, true );
@@ -454,6 +454,10 @@ var testAppend = function( valueObj ) {
jQuery("#select1").append( valueObj("<OPTION>Test</OPTION>") );
equal( jQuery("#select1 option:last").text(), "Test", "Appending OPTION (all caps)" );
+ jQuery("#select1").append( valueObj("<optgroup label='optgroup'><option>optgroup</option></optgroup>") );
+ equal( jQuery("#select1 optgroup").attr("label"), "optgroup", "Label attribute in newly inserted optgroup is correct" );
+ equal( jQuery("#select1 option:last").text(), "optgroup", "Appending optgroup" );
+
jQuery("#table").append( valueObj("<colgroup></colgroup>") );
equal( jQuery("#table colgroup").length, 1, "Append colgroup" );