aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/accordion/accordion_events.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/unit/accordion/accordion_events.js b/tests/unit/accordion/accordion_events.js
index 161da25bf..c3ba2e2c1 100644
--- a/tests/unit/accordion/accordion_events.js
+++ b/tests/unit/accordion/accordion_events.js
@@ -68,7 +68,7 @@ test( "beforeActivate", function() {
});
test( "activate", function() {
- expect( 20 );
+ expect( 21 );
var ac = $( "#list1" ).accordion({
active: false,
collapsible: true
@@ -107,6 +107,16 @@ test( "activate", function() {
equals( ui.newContent.size(), 0 );
});
ac.accordion( "option", "active", false );
+
+ // prevent activation
+ ac.one( "accordionbeforeactivate", function( event ) {
+ ok( true );
+ event.preventDefault();
+ });
+ ac.one( "accordionactivate", function() {
+ ok( false );
+ });
+ ac.accordion( "option", "active", 1 );
});
}( jQuery ) );