aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/selectable
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2015-01-30 10:00:11 -0500
committerAlexander Schmitz <arschmitz@gmail.com>2015-03-11 16:05:40 -0400
commit9af91bcfa9ddfa91e0d80aa652455f9b437deb75 (patch)
tree7fc2aadc9ca456687f2924ecf7349f3d0955dbd4 /tests/unit/selectable
parent5b359d0e1070e1163448d26f9b9ae6b313ecc088 (diff)
downloadjquery-ui-9af91bcfa9ddfa91e0d80aa652455f9b437deb75.tar.gz
jquery-ui-9af91bcfa9ddfa91e0d80aa652455f9b437deb75.zip
Selectable: Use new has/lacksClasses assertions for all class checks
Diffstat (limited to 'tests/unit/selectable')
-rw-r--r--tests/unit/selectable/selectable.html1
-rw-r--r--tests/unit/selectable/selectable_methods.js7
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/unit/selectable/selectable.html b/tests/unit/selectable/selectable.html
index cc4edf909..024d28911 100644
--- a/tests/unit/selectable/selectable.html
+++ b/tests/unit/selectable/selectable.html
@@ -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" ],
diff --git a/tests/unit/selectable/selectable_methods.js b/tests/unit/selectable/selectable_methods.js
index 179d4ecd6..02c9ab075 100644
--- a/tests/unit/selectable/selectable_methods.js
+++ b/tests/unit/selectable/selectable_methods.js
@@ -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" );