Skip to content

Commit 422b0f3

Browse files
committed
Unit Tests
Updated tests for issue #595
1 parent 454a71d commit 422b0f3

File tree

3 files changed

+59
-2
lines changed

3 files changed

+59
-2
lines changed

tests/unit/events.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
equals(this, el[0], "option: context of callback");
143143
equals(e.type, 'multiselectclick', 'option: event type in callback');
144144
equals(ui.value, "2", "option: ui.value equals");
145-
equals(ui.text, "Option 2", "option: ui.title equals");
145+
equals(ui.text, "Option 2", "option: ui.text equals");
146146

147147
if(times === 0) {
148148
equals(ui.checked, true, "option: ui.checked equals");
@@ -155,7 +155,7 @@
155155
ok(true, 'event: triggering the click event on the second checkbox triggers multiselectclick');
156156
equals(this, el[0], 'event: context of event');
157157
equals(ui.value, "2", "event: ui.value equals");
158-
equals(ui.text, "Option 2", "event: ui.title equals");
158+
equals(ui.text, "Option 2", "event: ui.text equals");
159159

160160
if(times === 0) {
161161
equals(ui.checked, true, "option: ui.checked equals");

tests/unit/methods.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,16 @@
122122
equals( el.multiselect("getChecked").length, 0, 'number of checkboxes returned after unchecking all and calling getChecked');
123123
el.multiselect("destroy");
124124
});
125+
126+
test("getUnchecked", function(){
127+
expect(2);
128+
129+
el = $("select").multiselect().multiselect("checkAll");
130+
equals( el.multiselect("getUnchecked").length, 0, 'number of checkboxes returned after checking all and calling getUnchecked');
131+
el.multiselect("uncheckAll");
132+
equals( el.multiselect("getUnchecked").length, 9, 'number of checkboxes returned after unchecking all and calling getUnchecked');
133+
el.multiselect("destroy");
134+
});
125135

126136
test("refresh", function(){
127137
expect(4);

tests/unit/testSuite.html

Lines changed: 47 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)