Skip to content
Permalink
Browse files

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

  • Loading branch information
arschmitz committed Jan 30, 2015
1 parent 5b359d0 commit 9af91bcfa9ddfa91e0d80aa652455f9b437deb75
Showing with 5 additions and 3 deletions.
  1. +1 −0 tests/unit/selectable/selectable.html
  2. +4 −3 tests/unit/selectable/selectable_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", "selectable" ],
@@ -71,7 +71,7 @@ test("enable", function() {
equal(actual, expected, "enable is chainable");
});

test( "disable", function() {
test( "disable", function( assert ) {
expect( 6 );
var chainable,
fired = false,
@@ -98,9 +98,10 @@ test( "disable", function() {
});
equal( fired, false, "start fired" );

ok( !element.selectable( "widget" ).hasClass( "ui-state-disabled" ), "element does not get ui-state-disabled" );
assert.lacksClasses( element.selectable( "widget" ), "ui-state-disabled" );

ok( !element.selectable( "widget" ).attr( "aria-disabled" ), "element does not get aria-disabled" );
ok( element.selectable( "widget" ).hasClass( "ui-selectable-disabled" ), "element gets ui-selectable-disabled" );
assert.hasClasses( element.selectable( "widget" ), "ui-selectable-disabled" );

element.selectable( "destroy" );

0 comments on commit 9af91bc

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