Skip to content

Commit e86a738

Browse files
author
ehynds
committed
make sure select's are in the DOM before performing tests
1 parent 0f5efb5 commit e86a738

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/unit/options.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@
6666

6767
var html = '<select multiple><option value="foo">foo &quot;with quotes&quot;</option><option value="bar">bar</option><option value="baz">baz</option></select>';
6868

69-
el = $(html).multiselect({
69+
el = $(html).appendTo("body").multiselect({
7070
selectedList: 3
7171
});
7272

7373
el.multiselect("checkAll");
7474
equals( button().text(), 'foo "with quotes", bar, baz', 'after checkAll, button text is a list of all options in the select');
75-
el.multiselect("destroy");
75+
el.multiselect("destroy").remove();
7676

77-
el = $(html).multiselect({
77+
el = $(html).appendTo("body").multiselect({
7878
selectedList: 2
7979
});
8080

@@ -121,7 +121,7 @@
121121

122122
test("selectedList - encoding", function() {
123123
el = $('<select><option value="A&amp;E">A&amp;E</option></select>')
124-
.appendTo(document.body)
124+
.appendTo("body")
125125
.multiselect({ selectedList: 1 });
126126

127127
equals(button().text(), 'A&E');

0 commit comments

Comments
 (0)