aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/autocomplete/autocomplete_methods.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/autocomplete/autocomplete_methods.js')
-rw-r--r--tests/unit/autocomplete/autocomplete_methods.js70
1 files changed, 35 insertions, 35 deletions
diff --git a/tests/unit/autocomplete/autocomplete_methods.js b/tests/unit/autocomplete/autocomplete_methods.js
index 61cf2a33c..3ad93844c 100644
--- a/tests/unit/autocomplete/autocomplete_methods.js
+++ b/tests/unit/autocomplete/autocomplete_methods.js
@@ -1,35 +1,35 @@
-/*
- * autocomplete_methods.js
- */
-(function($) {
-
-
-module("autocomplete: methods");
-
-test("destroy", function() {
- var beforeHtml = $("#autocomplete").parent().html();
- var afterHtml = $("#autocomplete").autocomplete().autocomplete("destroy").parent().html();
- same( beforeHtml, afterHtml );
-})
-
-var data = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "pearl"];
-
-test("search", function() {
- var ac = $("#autocomplete").autocomplete({
- source: data,
- minLength: 0
- });
- ac.autocomplete("search");
- same( $(".ui-menu .ui-menu-item").length, data.length, "all items for a blank search" );
-
- ac.val("has");
- ac.autocomplete("search")
- same( $(".ui-menu .ui-menu-item").text(), "haskell", "only one item for set input value" );
-
- ac.autocomplete("search", "ja");
- same( $(".ui-menu .ui-menu-item").length, 2, "only java and javascript for 'ja'" );
-
- $("#autocomplete").autocomplete("destroy");
-})
-
-})(jQuery);
+/*
+ * autocomplete_methods.js
+ */
+(function($) {
+
+
+module("autocomplete: methods");
+
+test("destroy", function() {
+ var beforeHtml = $("#autocomplete").parent().html();
+ var afterHtml = $("#autocomplete").autocomplete().autocomplete("destroy").parent().html();
+ same( beforeHtml, afterHtml );
+})
+
+var data = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "pearl"];
+
+test("search", function() {
+ var ac = $("#autocomplete").autocomplete({
+ source: data,
+ minLength: 0
+ });
+ ac.autocomplete("search");
+ same( $(".ui-menu .ui-menu-item").length, data.length, "all items for a blank search" );
+
+ ac.val("has");
+ ac.autocomplete("search")
+ same( $(".ui-menu .ui-menu-item").text(), "haskell", "only one item for set input value" );
+
+ ac.autocomplete("search", "ja");
+ same( $(".ui-menu .ui-menu-item").length, 2, "only java and javascript for 'ja'" );
+
+ $("#autocomplete").autocomplete("destroy");
+})
+
+})(jQuery);