Merge branch 'master' into PROT-9-webservice
[proteocache.git] / webapp / resources / datatables-1.9.4 / media / unit_testing / tests_onhold / 1_dom / fnDeleteRow.js
diff --git a/webapp/resources/datatables-1.9.4/media/unit_testing/tests_onhold/1_dom/fnDeleteRow.js b/webapp/resources/datatables-1.9.4/media/unit_testing/tests_onhold/1_dom/fnDeleteRow.js
new file mode 100755 (executable)
index 0000000..29a0b3f
--- /dev/null
@@ -0,0 +1,30 @@
+// DATA_TEMPLATE: dom_data
+oTest.fnStart( "fnDeleteRow" );
+
+$(document).ready( function () {
+       /* Check the default */
+       var oTable = $('#example').dataTable();
+       var oSettings = oTable.fnSettings();
+       
+       oTest.fnTest( 
+               "Check that the default data is sane",
+               null,
+               function () { return oSettings.asDataSearch.join(' ').match(/4.0/g).length == 3; }
+       );
+       
+       oTest.fnTest( 
+               "Remove the first data row, and check that hte search data has been updated",
+               function () { oTable.fnDeleteRow( 0 ); },
+               function () { return oSettings.asDataSearch.join(' ').match(/4.0/g).length == 2; }
+       );
+       
+       oTest.fnTest( 
+               "Check that the info element has been updated",
+               null,
+               function () { return $('#example_info').html() == "Showing 1 to 10 of 56 entries"; }
+       );
+       
+       
+       
+       oTest.fnComplete();
+} );
\ No newline at end of file