diff options
-rw-r--r-- | tests/unit/button/button.html | 1 | ||||
-rw-r--r-- | tests/unit/button/deprecated.html | 1 | ||||
-rw-r--r-- | tests/unit/button/options.js | 9 |
3 files changed, 11 insertions, 0 deletions
diff --git a/tests/unit/button/button.html b/tests/unit/button/button.html index 09b5a4c23..6cf27fb33 100644 --- a/tests/unit/button/button.html +++ b/tests/unit/button/button.html @@ -14,6 +14,7 @@ <div id="qunit-fixture"> <form id="form1"> <div><button id="button">Label</button></div> + <div><button id="button2">label <span>with span</span></button></div> <div><input id="submit" type="submit" value="Label"></div> </form> diff --git a/tests/unit/button/deprecated.html b/tests/unit/button/deprecated.html index 788d2eeeb..73f62921c 100644 --- a/tests/unit/button/deprecated.html +++ b/tests/unit/button/deprecated.html @@ -14,6 +14,7 @@ <div id="qunit-fixture"> <div class="buttonset"><button id="button">Label</button><button>button 2</button></div> +<div><button id="button2">label <span>with span</span></button></div> <div id="radio0" style="margin-top: 2em;"> <input type="radio" id="radio01" name="radio" checked="checked"><label for="radio01">Choice 1</label> diff --git a/tests/unit/button/options.js b/tests/unit/button/options.js index 077d868e3..6ef166974 100644 --- a/tests/unit/button/options.js +++ b/tests/unit/button/options.js @@ -76,6 +76,15 @@ test( "label, default", function() { deepEqual( button.button( "option", "label" ), "Label" ); } ); +test( "label, with html markup", function() { + expect( 3 ); + var button = $( "#button2" ).button(); + + deepEqual( button.text(), "label with span" ); + deepEqual( button.html().toLowerCase(), "label <span>with span</span>" ); + deepEqual( button.button( "option", "label" ).toLowerCase(), "label <span>with span</span>" ); +} ); + test( "label, explicit value", function() { expect( 2 ); var button = $( "#button" ).button( { |