diff options
Diffstat (limited to 'tests/unit/draggable/methods.js')
-rw-r--r-- | tests/unit/draggable/methods.js | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/unit/draggable/methods.js b/tests/unit/draggable/methods.js index 10a17efdb..77ba2434f 100644 --- a/tests/unit/draggable/methods.js +++ b/tests/unit/draggable/methods.js @@ -8,12 +8,12 @@ var element; module( "draggable: methods", { setup: function() { - element = $("<div style='background: green; width: 200px; height: 100px; position: absolute; top: 10px; left: 10px;'><span>Absolute</span></div>").appendTo("#qunit-fixture"); + element = $( "<div style='background: green; width: 200px; height: 100px; position: absolute; top: 10px; left: 10px;'><span>Absolute</span></div>" ).appendTo( "#qunit-fixture" ); }, teardown: function() { element.remove(); } -}); +} ); test( "init", function() { expect( 5 ); @@ -21,10 +21,10 @@ test( "init", function() { element.draggable(); ok( true, ".draggable() called on element" ); - $([]).draggable(); + $( [] ).draggable(); ok( true, ".draggable() called on empty collection" ); - $("<div></div>").draggable(); + $( "<div></div>" ).draggable(); ok( true, ".draggable() called on disconnected DOMElement" ); element.draggable( "option", "foo" ); @@ -32,52 +32,52 @@ test( "init", function() { element.draggable( "option", "foo", "bar" ); ok( true, "arbitrary option setter after init" ); -}); +} ); test( "destroy", function() { expect( 4 ); - element.draggable().draggable("destroy"); + element.draggable().draggable( "destroy" ); ok( true, ".draggable('destroy') called on element" ); - $([]).draggable().draggable("destroy"); + $( [] ).draggable().draggable( "destroy" ); ok( true, ".draggable('destroy') called on empty collection" ); - element.draggable().draggable("destroy"); + element.draggable().draggable( "destroy" ); ok( true, ".draggable('destroy') called on disconnected DOMElement" ); var expected = element.draggable(), - actual = expected.draggable("destroy"); + actual = expected.draggable( "destroy" ); equal( actual, expected, "destroy is chainable" ); -}); +} ); test( "enable", function() { expect( 11 ); - element.draggable({ disabled: true }); + element.draggable( { disabled: true } ); testHelper.shouldNotDrag( element, ".draggable({ disabled: true })" ); - element.draggable("enable"); + element.draggable( "enable" ); testHelper.shouldMove( element, ".draggable('enable')" ); equal( element.draggable( "option", "disabled" ), false, "disabled option getter" ); - element.draggable("destroy"); - element.draggable({ disabled: true }); + element.draggable( "destroy" ); + element.draggable( { disabled: true } ); testHelper.shouldNotDrag( element, ".draggable({ disabled: true })" ); element.draggable( "option", "disabled", false ); - equal(element.draggable( "option", "disabled" ), false, "disabled option setter" ); + equal( element.draggable( "option", "disabled" ), false, "disabled option setter" ); testHelper.shouldMove( element, ".draggable('option', 'disabled', false)" ); var expected = element.draggable(), - actual = expected.draggable("enable"); + actual = expected.draggable( "enable" ); equal( actual, expected, "enable is chainable" ); -}); +} ); test( "disable", function( assert ) { expect( 14 ); - element = $( "#draggable2" ).draggable({ disabled: false }); + element = $( "#draggable2" ).draggable( { disabled: false } ); testHelper.shouldMove( element, ".draggable({ disabled: false })" ); element.draggable( "disable" ); @@ -85,7 +85,7 @@ test( "disable", function( assert ) { equal( element.draggable( "option", "disabled" ), true, "disabled option getter" ); element.draggable( "destroy" ); - element.draggable({ disabled: false }); + element.draggable( { disabled: false } ); testHelper.shouldMove( element, ".draggable({ disabled: false })" ); element.draggable( "option", "disabled", true ); @@ -99,6 +99,6 @@ test( "disable", function( assert ) { var expected = element.draggable(), actual = expected.draggable( "disable" ); equal( actual, expected, "disable is chainable" ); -}); +} ); } ); |