aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/attributes.js
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2015-10-14 15:07:53 -0400
committerRichard Gibson <richard.gibson@gmail.com>2015-10-25 15:00:51 -0400
commitc003cd6bc8336927dad70889ee24e176f90b25a9 (patch)
tree06b41db5a0bcedb5ddb0d94d33a8643756ab1200 /test/unit/attributes.js
parentf24726daa3760014b7283ad14a13117c72dd9474 (diff)
downloadjquery-c003cd6bc8336927dad70889ee24e176f90b25a9.tar.gz
jquery-c003cd6bc8336927dad70889ee24e176f90b25a9.zip
Attributes: Use simpler boolean check vs a function call
Ref gh-2491 (cherry picked from commit 4bf1a09522955eb52de1fafb4ee1ecc5982b7a3e)
Diffstat (limited to 'test/unit/attributes.js')
-rw-r--r--test/unit/attributes.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js
index 028931c70..ba9d551aa 100644
--- a/test/unit/attributes.js
+++ b/test/unit/attributes.js
@@ -1220,7 +1220,7 @@ QUnit.test( "removeClass(undefined) is a no-op", function( assert ) {
} );
var testToggleClass = function( valueObj, assert ) {
- assert.expect( 9 );
+ assert.expect( 11 );
var e = jQuery( "#firstp" );
assert.ok( !e.is( ".test" ), "Assert class not present" );
@@ -1232,8 +1232,12 @@ var testToggleClass = function( valueObj, assert ) {
// class name with a boolean
e.toggleClass( valueObj( "test" ), false );
assert.ok( !e.is( ".test" ), "Assert class not present" );
+ e.toggleClass( valueObj( "test" ), false );
+ assert.ok( !e.is( ".test" ), "Assert class still not present" );
e.toggleClass( valueObj( "test" ), true );
assert.ok( e.is( ".test" ), "Assert class present" );
+ e.toggleClass( valueObj( "test" ), true );
+ assert.ok( e.is( ".test" ), "Assert class still present" );
e.toggleClass( valueObj( "test" ), false );
assert.ok( !e.is( ".test" ), "Assert class not present" );