diff options
author | Scott González <scott.gonzalez@gmail.com> | 2015-03-23 18:42:23 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2015-03-25 15:55:53 -0400 |
commit | 899d90709a141ce22fedab2cfdf6044d9928f831 (patch) | |
tree | 3ffc9ed66db142e5661586fa42083bb4bcb7cadd /tests/unit/tooltip | |
parent | e109e768190089744804d084e9a26f010dd63a37 (diff) | |
download | jquery-ui-899d90709a141ce22fedab2cfdf6044d9928f831.tar.gz jquery-ui-899d90709a141ce22fedab2cfdf6044d9928f831.zip |
Tests: Handle jQuery git returning `null` for empty attributes
jQuery now returns `null` for empty attributes instead of `undefined`.
Closes gh-1516
Diffstat (limited to 'tests/unit/tooltip')
-rw-r--r-- | tests/unit/tooltip/tooltip_core.js | 3 | ||||
-rw-r--r-- | tests/unit/tooltip/tooltip_methods.js | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/tests/unit/tooltip/tooltip_core.js b/tests/unit/tooltip/tooltip_core.js index 10ebb2829..d4520a4ea 100644 --- a/tests/unit/tooltip/tooltip_core.js +++ b/tests/unit/tooltip/tooltip_core.js @@ -38,8 +38,7 @@ test( "accessibility", function() { equal( element.attr( "aria-describedby" ), "fixture-span " + tooltipId, "multiple describedby when open" ); - // strictEqual to distinguish between .removeAttr( "title" ) and .attr( "title", "" ) - strictEqual( element.attr( "title" ), undefined, "no title when open" ); + equal( element.attr( "title" ), null, "no title when open" ); equal( liveRegion.children().length, 1 ); equal( liveRegion.children().last().html(), "..." ); element.tooltip( "close" ); diff --git a/tests/unit/tooltip/tooltip_methods.js b/tests/unit/tooltip/tooltip_methods.js index ea69216d0..f027d5226 100644 --- a/tests/unit/tooltip/tooltip_methods.js +++ b/tests/unit/tooltip/tooltip_methods.js @@ -70,7 +70,7 @@ test( "enable/disable", function( assert ) { assert.lacksClasses( element.tooltip( "widget" ), "ui-state-disabled" ); ok( !element.tooltip( "widget" ).attr( "aria-disabled" ), "element doesn't get aria-disabled" ); assert.lacksClasses( element.tooltip( "widget" ), "ui-tooltip-disabled" ); - strictEqual( tooltip.attr( "title" ), undefined, "title removed on disable" ); + equal( tooltip.attr( "title" ), null, "title removed on disable" ); element.tooltip( "open" ); equal( $( ".ui-tooltip" ).length, 0, "open does nothing when disabled" ); |