Browse files

Progressbar: Add test to make sure indeterminate progressbar doesn't …

…trigger complete event.
  • Loading branch information...
1 parent 8773a33 commit 167968779542d56b5d0628242758c9de930224a9 @kborchers kborchers committed Nov 21, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 tests/unit/progressbar/progressbar_events.js
View
6 tests/unit/progressbar/progressbar_events.js
@@ -23,7 +23,7 @@ test( "change", function() {
});
test( "complete", function() {
- expect( 3 );
+ expect( 4 );
var value,
changes = 0,
element = $( "#progressbar" ).progressbar({
@@ -32,12 +32,14 @@ test( "complete", function() {
deepEqual( element.progressbar( "value" ), value, "change at " + value );
},
complete: function() {
- equal( changes, 2, "complete triggered after change" );
+ equal( changes, 3, "complete triggered after change and not on indeterminate" );
}
});
value = 5;
element.progressbar( "value", value );
+ value = false;
+ element.progressbar( "value", value );
value = 100;
element.progressbar( "value", value );
});

0 comments on commit 1679687

Please sign in to comment.