aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/widget/widget_tickets.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-03-28 12:37:08 -0400
committerScott González <scott.gonzalez@gmail.com>2011-03-28 12:37:08 -0400
commit78b17f9d76a552d997aececbf5f848adf906d997 (patch)
tree690266bc72dd8dcf8a73a679ef72929aadb91522 /tests/unit/widget/widget_tickets.js
parent6a0cdaa4954038a84cd32098359fe1ca62eb3585 (diff)
downloadjquery-ui-78b17f9d76a552d997aececbf5f848adf906d997.tar.gz
jquery-ui-78b17f9d76a552d997aececbf5f848adf906d997.zip
Widget: Moved tests out of _tickets into _core.
Diffstat (limited to 'tests/unit/widget/widget_tickets.js')
-rw-r--r--tests/unit/widget/widget_tickets.js91
1 files changed, 0 insertions, 91 deletions
diff --git a/tests/unit/widget/widget_tickets.js b/tests/unit/widget/widget_tickets.js
deleted file mode 100644
index 9c0bddf03..000000000
--- a/tests/unit/widget/widget_tickets.js
+++ /dev/null
@@ -1,91 +0,0 @@
-(function( $ ) {
-
-module( "widget: tickets" );
-
-test( "#5830 - Widget: Using inheritance overwrites the base classes options", function() {
- $.widget( "ui.testWidgetBase", {
- options: {
- obj: {
- key1: "foo",
- key2: "bar"
- },
- arr: [ "testing" ]
- }
- });
-
- $.widget( "ui.testWidgetExtension", $.ui.testWidgetBase, {
- options: {
- obj: {
- key1: "baz"
- },
- arr: [ "alpha", "beta" ]
- }
- });
-
- same( $.ui.testWidgetBase.prototype.options.obj, {
- key1: "foo",
- key2: "bar"
- }, "base class option object not overridden");
- same( $.ui.testWidgetBase.prototype.options.arr, [ "testing" ],
- "base class option array not overridden");
-
- same( $.ui.testWidgetExtension.prototype.options.obj, {
- key1: "baz",
- key2: "bar"
- }, "extension class option object extends base");
- same( $.ui.testWidgetExtension.prototype.options.arr, [ "alpha", "beta" ],
- "extension class option array overwrites base");
-
- delete $.ui.testWidgetBase;
- delete $.ui.testWidgetExtension;
-});
-
-test( "#6795 - Widget: handle array arguments to _trigger consistently", function() {
- expect( 4 );
-
- $.widget( "ui.testWidget", {
- _create: function() {},
- testEvent: function() {
- var ui = {
- foo: "bar",
- baz: {
- qux: 5,
- quux: 20
- }
- };
- var extra = {
- bar: 5
- };
- this._trigger( "foo", null, [ ui, extra ] );
- }
- });
- $( "#widget" ).bind( "testwidgetfoo", function( event, ui, extra ) {
- same( ui, {
- foo: "bar",
- baz: {
- qux: 5,
- quux: 20
- }
- }, "event: ui hash passed" );
- same( extra, {
- bar: 5
- }, "event: extra argument passed" );
- });
- $( "#widget" ).testWidget({
- foo: function( event, ui, extra ) {
- same( ui, {
- foo: "bar",
- baz: {
- qux: 5,
- quux: 20
- }
- }, "callback: ui hash passed" );
- same( extra, {
- bar: 5
- }, "callback: extra argument passed" );
- }
- })
- .testWidget( "testEvent" );
-});
-
-}( jQuery ) );