Accordion: Improved resize-method test, starting with a fixed container height

This commit is contained in:
jzaefferer 2010-04-03 17:27:00 +02:00
parent 7d1c9cd348
commit 7902d3945f

View File

@ -114,7 +114,7 @@ test("activate, jQuery or DOM element", function() {
}); });
test("resize", function() { test("resize", function() {
var expected = $('#list1').accordion({ var expected = $('#list1').parent().height(300).end().accordion({
fillSpace: true fillSpace: true
}); });
@ -130,7 +130,7 @@ test("resize", function() {
expected.find(".ui-accordion-content").each(function() { expected.find(".ui-accordion-content").each(function() {
sizes2.push($(this).outerHeight()); sizes2.push($(this).outerHeight());
}); });
same(sizes, [38, 38, 38]); same(sizes, [246, 246, 246]);
expected.parent().height(500); expected.parent().height(500);
expected.accordion("resize"); expected.accordion("resize");