aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/button/options.js
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2015-10-28 19:04:09 +0100
committerJörn Zaefferer <joern.zaefferer@gmail.com>2015-10-29 15:45:26 +0100
commitf1b643ec67c7c8d96e1612c4b7d73fc49b6ae3cd (patch)
treed22cd9c71786c9d207043d896be57db6c39ce344 /tests/unit/button/options.js
parent9644e7bae9116edaf8d37c5b38cb32b892f10ff6 (diff)
downloadjquery-ui-f1b643ec67c7c8d96e1612c4b7d73fc49b6ae3cd.tar.gz
jquery-ui-f1b643ec67c7c8d96e1612c4b7d73fc49b6ae3cd.zip
Button: Add tests for button with html markup
Ref gh-1632 Ref jquery/api.jqueryui.com#281
Diffstat (limited to 'tests/unit/button/options.js')
-rw-r--r--tests/unit/button/options.js9
1 files changed, 9 insertions, 0 deletions
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( {