Permalink
Browse files

[controlgroup tests] The new way to refresh a controlgroup is not to …

…recreate it, but to call its refresh() method - let the unit tests reflect that
  • Loading branch information...
gabrielschulhof committed Nov 2, 2012
1 parent 85b355f commit 7f18a3713d162f52ab0174fb6e4ed6a3a5e66bb1
Showing with 6 additions and 6 deletions.
  1. +6 −6 tests/unit/controlgroup/controlgroup_core.js
@@ -24,7 +24,7 @@
setup: function() {
this.vcontrolgroup = $( "#vertical-controlgroup" );
this.vcontrolgroup.find( ".ui-btn" ).show();
- this.vcontrolgroup.controlgroup();
+ this.vcontrolgroup.controlgroup( "refresh" );
}
});
@@ -33,7 +33,7 @@
//We hide the first button and refresh
this.vcontrolgroup.find( ".ui-btn" ).first().hide();
- this.vcontrolgroup.controlgroup();
+ this.vcontrolgroup.controlgroup( "refresh" );
var buttons = this.vcontrolgroup.find( ".ui-btn" ).filter( ":visible" ),
middlebuttons = buttons.filter(function(index) { return index > 0 && index < (length-1)}),
@@ -50,7 +50,7 @@
//We hide the last button and refresh
this.vcontrolgroup.find( ".ui-btn" ).last().hide();
- this.vcontrolgroup.controlgroup();
+ this.vcontrolgroup.controlgroup( "refresh" );
var buttons = this.vcontrolgroup.find( ".ui-btn" ).filter( ":visible" ),
middlebuttons = buttons.filter(function(index) { return index > 0 && index < (length-1)}),
@@ -84,14 +84,14 @@
setup: function() {
this.hcontrolgroup = $( "#horizontal-controlgroup" );
this.hcontrolgroup.find( ".ui-btn" ).show();
- this.hcontrolgroup.controlgroup();
+ this.hcontrolgroup.controlgroup( "refresh" );
}
});
test( "horizontal controlgroup after first button was hidden", function() {
//We hide the first button and refresh
this.hcontrolgroup.find( ".ui-btn" ).first().hide();
- this.hcontrolgroup.controlgroup();
+ this.hcontrolgroup.controlgroup( "refresh" );
var buttons = this.hcontrolgroup.find( ".ui-btn" ).filter( ":visible" ),
middlebuttons = buttons.filter(function(index) { return index > 0 && index < (length-1)}),
@@ -106,7 +106,7 @@
test( "horizontal controlgroup after last button was hidden", function() {
//We hide the last button and refresh
this.hcontrolgroup.find( ".ui-btn" ).last().hide();
- this.hcontrolgroup.controlgroup();
+ this.hcontrolgroup.controlgroup( "refresh" );
var buttons = this.hcontrolgroup.find( ".ui-btn" ).filter( ":visible" ),
middlebuttons = buttons.filter(function(index) { return index > 0 && index < (length-1)}),

0 comments on commit 7f18a37

Please sign in to comment.