From 1e28040cf358d0fe81ee83a2e35d7dbb65362afa Mon Sep 17 00:00:00 2001 From: Scott González Date: Fri, 27 Aug 2010 14:48:17 -0400 Subject: Widget: Throw errors when calling non-existent methods or methods on uninistantiated widgets. Fixes #5972 - Widget: Throw error for non-existent method calls. --- tests/unit/slider/slider.html | 1 + tests/unit/slider/slider_methods.js | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'tests/unit/slider') diff --git a/tests/unit/slider/slider.html b/tests/unit/slider/slider.html index 1ba5f76af..765340eb5 100644 --- a/tests/unit/slider/slider.html +++ b/tests/unit/slider/slider.html @@ -15,6 +15,7 @@ + diff --git a/tests/unit/slider/slider_methods.js b/tests/unit/slider/slider_methods.js index 567c5de2e..77ae65148 100644 --- a/tests/unit/slider/slider_methods.js +++ b/tests/unit/slider/slider_methods.js @@ -6,7 +6,7 @@ module("slider: methods"); test("init", function() { - expect(6); + expect(5); $("
").appendTo('body').slider().remove(); ok(true, '.slider() called on element'); @@ -17,9 +17,6 @@ test("init", function() { $('
').slider().remove(); ok(true, '.slider() called on disconnected DOMElement'); - $('
').slider().slider("foo").remove(); - ok(true, 'arbitrary method called after init'); - var el = $('
').slider(); var foo = el.slider("option", "foo"); el.remove(); @@ -39,9 +36,6 @@ test("destroy", function() { $('
').appendTo('body').remove().slider().slider("destroy").remove(); ok(true, '.slider("destroy") called on disconnected DOMElement'); - $('
').slider().slider("destroy").slider("foo").remove(); - ok(true, 'arbitrary method called after destroy'); - var expected = $('
').slider(), actual = expected.slider('destroy'); equals(actual, expected, 'destroy is chainable'); -- cgit v1.2.3