Skip to content

Commit 09139be

Browse files
committed
Test for PR #567
1 parent 3378031 commit 09139be

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

tests/unit/options.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
var height = 234;
137137

138138
el = $("select").multiselect({ height: height }).multiselect("open");
139-
equals( height, menu().find("ul.ui-multiselect-checkboxes").height(), 'height after opening propertly set to '+height );
139+
equals( height, menu().find("ul.ui-multiselect-checkboxes").height(), 'height after opening property set to '+height );
140140

141141
// change height and re-test
142142
height = 333;
@@ -167,6 +167,22 @@
167167

168168
el.multiselect("destroy");
169169
});
170+
171+
test("menuWidth", function(){
172+
expect(2);
173+
var width = 50;
174+
175+
el = $("select").multiselect({ minWidth: 100, menuWidth:width }).multiselect("open");
176+
177+
equals( menu().parent().find(".ui-multiselect-menu").outerWidth(), width, 'width after opening, property set to '+width );
178+
179+
// change height and re-test
180+
width = 300;
181+
el.multiselect("option", "menuWidth", width).multiselect('refresh');
182+
equals( menu().parent().find(".ui-multiselect-menu").outerWidth(), width, 'changing value through api to '+width );
183+
184+
el.multiselect("destroy");
185+
});
170186

171187
test("checkAllText", function(){
172188
expect(2);

0 commit comments

Comments
 (0)