aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/selectable/selectable_methods.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/selectable/selectable_methods.js')
-rw-r--r--tests/unit/selectable/selectable_methods.js20
1 files changed, 8 insertions, 12 deletions
diff --git a/tests/unit/selectable/selectable_methods.js b/tests/unit/selectable/selectable_methods.js
index ee7242d9b..aa8924176 100644
--- a/tests/unit/selectable/selectable_methods.js
+++ b/tests/unit/selectable/selectable_methods.js
@@ -6,7 +6,7 @@
module("selectable: methods");
test("init", function() {
- expect(6);
+ expect( 5 );
$("<div></div>").appendTo('body').selectable().remove();
ok(true, '.selectable() called on element');
@@ -17,10 +17,7 @@ test("init", function() {
$("<div></div>").selectable().remove();
ok(true, '.selectable() called on disconnected DOMElement');
- $("<div></div>").selectable().selectable("foo").remove();
- ok(true, 'arbitrary method called after init');
-
- el = $("<div></div>").selectable();
+ var el = $("<div></div>").selectable();
el.selectable("option", "foo");
el.remove();
ok(true, 'arbitrary option getter after init');
@@ -30,6 +27,8 @@ test("init", function() {
});
test("destroy", function() {
+ expect( 4 );
+
$("<div></div>").appendTo('body').selectable().selectable("destroy").remove();
ok(true, '.selectable("destroy") called on element');
@@ -39,9 +38,6 @@ test("destroy", function() {
$("<div></div>").selectable().selectable("destroy").remove();
ok(true, '.selectable("destroy") called on disconnected DOMElement');
- $("<div></div>").selectable().selectable("destroy").selectable("foo").remove();
- ok(true, 'arbitrary method called after destroy');
-
var expected = $('<div></div>').selectable(),
actual = expected.selectable('destroy');
equal(actual, expected, 'destroy is chainable');
@@ -50,9 +46,9 @@ test("destroy", function() {
test("enable", function() {
expect(3);
var expected, actual,
- fired = false;
+ fired = false,
+ el = $("#selectable1");
- el = $("#selectable1");
el.selectable({
disabled: true,
start: function() { fired = true; }
@@ -72,9 +68,9 @@ test("enable", function() {
test("disable", function() {
expect(3);
var expected, actual,
- fired = false;
+ fired = false,
+ el = $("#selectable1");
- el = $("#selectable1");
el.selectable({
disabled: false,
start: function() { fired = true; }