web/test/jstests/test_utils.js
changeset 9259 68cde7431c2c
parent 8879 982a49239420
child 10426 ce213d6858f1
--- a/web/test/jstests/test_utils.js	Mon Aug 26 11:36:19 2013 +0200
+++ b/web/test/jstests/test_utils.js	Mon Aug 26 16:16:22 2013 +0200
@@ -47,11 +47,11 @@
   module("sliceList");
   test("test slicelist", function() {
       var list = ['a', 'b', 'c', 'd', 'e', 'f'];
-      same(sliceList(list, 2),  ['c', 'd', 'e', 'f']);
-      same(sliceList(list, 2, -2), ['c', 'd']);
-      same(sliceList(list, -3), ['d', 'e', 'f']);
-      same(sliceList(list, 0, -2), ['a', 'b', 'c', 'd']);
-      same(sliceList(list),  list);
+      same(cw.utils.sliceList(list, 2),  ['c', 'd', 'e', 'f']);
+      same(cw.utils.sliceList(list, 2, -2), ['c', 'd']);
+      same(cw.utils.sliceList(list, -3), ['d', 'e', 'f']);
+      same(cw.utils.sliceList(list, 0, -2), ['a', 'b', 'c', 'd']);
+      same(cw.utils.sliceList(list),  list);
   });
 
   module("formContents", {
@@ -83,7 +83,7 @@
 			     'value="one" />');
       $('#test-form').append('<input name="unchecked-choice" type="radio" ' +
 			     'value="two"/>');
-      same(formContents($('#test-form')[0]), [
+      same(cw.utils.formContents($('#test-form')[0]), [
 	['input-text', 'mytextarea', 'choice', 'check', 'theselect'],
 	['toto', 'Hello World!', 'no', 'no', 'foo']
       ]);