Skip to content

Commit

Permalink
Progressbar: Add test to make sure indeterminate progressbar doesn't …
Browse files Browse the repository at this point in the history
…trigger complete event.
  • Loading branch information
kborchers committed Nov 22, 2012
1 parent 8773a33 commit 1679687
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/unit/progressbar/progressbar_events.js
Expand Up @@ -23,7 +23,7 @@ test( "change", function() {
});

test( "complete", function() {
expect( 3 );
expect( 4 );
var value,
changes = 0,
element = $( "#progressbar" ).progressbar({
Expand All @@ -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.