]> source.dussan.org Git - jquery-ui.git/commitdiff
Resizable: Use new has/lacksClasses assertions for all class checks
authorAlexander Schmitz <arschmitz@gmail.com>
Fri, 30 Jan 2015 14:59:26 +0000 (09:59 -0500)
committerAlexander Schmitz <arschmitz@gmail.com>
Wed, 11 Mar 2015 20:05:40 +0000 (16:05 -0400)
tests/unit/resizable/resizable.html
tests/unit/resizable/resizable_methods.js

index a44346e7cbaaaa15ab1947d5f89531b0545a96a6..3713252b308e45245014ae916bd636ea339c91b4 100644 (file)
@@ -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" ],
index abb8951f930285c9cb4d7b9a65e186fc042c9712..997293099f1c4bb5647c2c74db163b24d501fbfd 100644 (file)
@@ -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" );
 });