Merge branch 'master' into PROT-9-webservice
[proteocache.git] / webapp / resources / datatables-1.9.4 / media / unit_testing / tests_onhold / 5_ajax_objects / aoColumns.sName.js
diff --git a/webapp/resources/datatables-1.9.4/media/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sName.js b/webapp/resources/datatables-1.9.4/media/unit_testing/tests_onhold/5_ajax_objects/aoColumns.sName.js
new file mode 100755 (executable)
index 0000000..08fe49b
--- /dev/null
@@ -0,0 +1,28 @@
+// DATA_TEMPLATE: empty_table
+oTest.fnStart( "aoColumns.sName" );
+
+/* This has no effect at all in DOM methods - so we just check that it has applied the name */
+
+$(document).ready( function () {
+       /* Check the default */
+       var oTable = $('#example').dataTable( {
+               "sAjaxSource": "../../../examples/ajax/sources/objects.txt",
+               "aoColumns": [
+                       { "mData": "engine" },
+                       { "mData": "browser" },
+                       { "mData": "platform" },
+                       { "mData": "version", "sName": 'unit test' },
+                       { "mData": "grade" }
+               ]
+       } );
+       var oSettings = oTable.fnSettings();
+       
+       oTest.fnWaitTest( 
+               "Names are stored in the columns object",
+               null,
+               function () { return oSettings.aoColumns[3].sName =="unit test"; }
+       );
+       
+       
+       oTest.fnComplete();
+} );
\ No newline at end of file