aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/tooltip
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2015-01-30 11:01:32 -0500
committerAlexander Schmitz <arschmitz@gmail.com>2015-03-11 16:05:41 -0400
commit7b01dc3d2c14e34740d344e2a0f714ed59915d2c (patch)
tree7ade002144df016b37b49597749866666f5822d0 /tests/unit/tooltip
parentb88a8210707a0c88db381927d0da8cdde4402ef7 (diff)
downloadjquery-ui-7b01dc3d2c14e34740d344e2a0f714ed59915d2c.tar.gz
jquery-ui-7b01dc3d2c14e34740d344e2a0f714ed59915d2c.zip
Tooltip: Use new has/lacksClasses assertions for all class checks
Diffstat (limited to 'tests/unit/tooltip')
-rw-r--r--tests/unit/tooltip/tooltip_deprecated.js4
-rw-r--r--tests/unit/tooltip/tooltip_methods.js6
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/unit/tooltip/tooltip_deprecated.js b/tests/unit/tooltip/tooltip_deprecated.js
index 426f583ec..a53a27050 100644
--- a/tests/unit/tooltip/tooltip_deprecated.js
+++ b/tests/unit/tooltip/tooltip_deprecated.js
@@ -2,12 +2,12 @@
module( "tooltip: (deprecated) options" );
-test( "tooltipClass", function() {
+test( "tooltipClass", function( assert ) {
expect( 1 );
var element = $( "#tooltipped1" ).tooltip({
tooltipClass: "custom"
}).tooltip( "open" );
- ok( $( "#" + element.data( "ui-tooltip-id" ) ).hasClass( "custom" ) );
+ assert.hasClasses( $( "#" + element.data( "ui-tooltip-id" ) ), "custom" );
});
}( jQuery ) );
diff --git a/tests/unit/tooltip/tooltip_methods.js b/tests/unit/tooltip/tooltip_methods.js
index e6641a14a..ea69216d0 100644
--- a/tests/unit/tooltip/tooltip_methods.js
+++ b/tests/unit/tooltip/tooltip_methods.js
@@ -53,7 +53,7 @@ test( "open/close with tracking", function() {
$.fx.off = false;
});
-test( "enable/disable", function() {
+test( "enable/disable", function( assert ) {
expect( 11 );
$.fx.off = true;
var tooltip,
@@ -67,9 +67,9 @@ test( "enable/disable", function() {
element.tooltip( "disable" );
equal( $( ".ui-tooltip" ).length, 0, "no tooltip when disabled" );
- ok( !element.tooltip( "widget" ).hasClass( "ui-state-disabled" ), "element doesn't get ui-state-disabled" );
+ assert.lacksClasses( element.tooltip( "widget" ), "ui-state-disabled" );
ok( !element.tooltip( "widget" ).attr( "aria-disabled" ), "element doesn't get aria-disabled" );
- ok( !element.tooltip( "widget" ).hasClass( "ui-tooltip-disabled" ), "element doesn't get ui-tooltip-disabled" );
+ assert.lacksClasses( element.tooltip( "widget" ), "ui-tooltip-disabled" );
strictEqual( tooltip.attr( "title" ), undefined, "title removed on disable" );
element.tooltip( "open" );