Skip to content
Permalink
Browse files

Resizable: Use new has/lacksClasses assertions for all class checks

  • Loading branch information
arschmitz committed Jan 30, 2015
1 parent 3b85fd2 commit 5b359d0e1070e1163448d26f9b9ae6b313ecc088
Showing with 4 additions and 3 deletions.
  1. +1 −0 tests/unit/resizable/resizable.html
  2. +3 −3 tests/unit/resizable/resizable_methods.js
@@ -9,6 +9,7 @@
<script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
<script src="../testsuite.js"></script>
<script src="../../../external/qunit-assert-classes/qunit-assert-classes.js"></script>
<script>
TestHelpers.loadResources({
css: [ "core", "resizable" ],
@@ -5,15 +5,15 @@

module( "resizable: methods" );

test( "disable", function() {
test( "disable", function( assert ) {
expect( 5 );

var element = $( "#resizable1" ).resizable({ disabled: false }),
chainable = element.resizable( "disable" );

ok( !element.resizable( "widget" ).hasClass( "ui-state-disabled" ), "element does not get ui-state-disabled" );
assert.lacksClasses( element.resizable( "widget" ), "ui-state-disabled" );
ok( !element.resizable( "widget" ).attr( "aria-disabled" ), "element does not get aria-disabled" );
ok( element.resizable( "widget" ).hasClass( "ui-resizable-disabled" ), "element gets ui-resizable-disabled" );
assert.hasClasses( element.resizable( "widget" ), "ui-resizable-disabled" );
equal( element.resizable( "option", "disabled" ), true, "disabled option setter" );
equal( chainable, element, "disable is chainable" );
});

0 comments on commit 5b359d0

Please sign in to comment.
You can’t perform that action at this time.