1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-03-15 16:29:16 +01:00

Fix: fnRender unit tests need to be updated for the change to the second argument being passed

This commit is contained in:
Allan Jardine 2011-12-27 13:54:22 +00:00
parent 8c9f0b61e8
commit dae243eb7a
6 changed files with 25 additions and 19 deletions

View File

@ -25,16 +25,17 @@ $(document).ready( function () {
); );
oTest.fnTest( oTest.fnTest(
"Confirm that fnRender passes one argument (an object) with three parameters", "Confirm that fnRender passes two arguments with four parameters",
function () { function () {
mTmp = true; mTmp = true;
oSession.fnRestore(); oSession.fnRestore();
oTable = $('#example').dataTable( { oTable = $('#example').dataTable( {
"aoColumns": [ "aoColumns": [
null, null,
{ "fnRender": function (a) { { "fnRender": function (a, v) {
if ( arguments.length != 1 || typeof a.iDataRow=='undefined' || if ( arguments.length != 2 || typeof a.iDataRow=='undefined' ||
typeof a.iDataColumn=='undefined' || typeof a.aData=='undefined' ) typeof a.iDataColumn=='undefined' || typeof a.aData=='undefined' ||
typeof a.mDataProp=='undefined' )
{ {
mTmp = false; mTmp = false;
} }

View File

@ -26,7 +26,7 @@ $(document).ready( function () {
); );
oTest.fnTest( oTest.fnTest(
"Confirm that fnRender passes one argument (an object) with three parameters", "Confirm that fnRender passes two arguments with four parameters",
function () { function () {
mTmp = true; mTmp = true;
oSession.fnRestore(); oSession.fnRestore();
@ -35,8 +35,9 @@ $(document).ready( function () {
"aoColumns": [ "aoColumns": [
null, null,
{ "fnRender": function (a) { { "fnRender": function (a) {
if ( arguments.length != 1 || typeof a.iDataRow=='undefined' || if ( arguments.length != 2 || typeof a.iDataRow=='undefined' ||
typeof a.iDataColumn=='undefined' || typeof a.aData=='undefined' ) typeof a.iDataColumn=='undefined' || typeof a.aData=='undefined' ||
typeof a.mDataProp=='undefined' )
{ {
mTmp = false; mTmp = false;
} }

View File

@ -26,7 +26,7 @@ $(document).ready( function () {
); );
oTest.fnWaitTest( oTest.fnWaitTest(
"Confirm that fnRender passes one argument (an object) with three parameters", "Confirm that fnRender passes two arguments with four parameters",
function () { function () {
mTmp = true; mTmp = true;
oSession.fnRestore(); oSession.fnRestore();
@ -35,8 +35,9 @@ $(document).ready( function () {
"aoColumns": [ "aoColumns": [
null, null,
{ "fnRender": function (a) { { "fnRender": function (a) {
if ( arguments.length != 1 || typeof a.iDataRow=='undefined' || if ( arguments.length != 2 || typeof a.iDataRow=='undefined' ||
typeof a.iDataColumn=='undefined' || typeof a.aData=='undefined' ) typeof a.iDataColumn=='undefined' || typeof a.aData=='undefined' ||
typeof a.mDataProp=='undefined' )
{ {
mTmp = false; mTmp = false;
} }

View File

@ -27,7 +27,7 @@ $(document).ready( function () {
); );
oTest.fnWaitTest( oTest.fnWaitTest(
"Confirm that fnRender passes one argument (an object) with three parameters", "Confirm that fnRender passes two arguments with four parameters",
function () { function () {
mTmp = true; mTmp = true;
oSession.fnRestore(); oSession.fnRestore();
@ -37,8 +37,9 @@ $(document).ready( function () {
"aoColumns": [ "aoColumns": [
null, null,
{ "fnRender": function (a) { { "fnRender": function (a) {
if ( arguments.length != 1 || typeof a.iDataRow=='undefined' || if ( arguments.length != 2 || typeof a.iDataRow=='undefined' ||
typeof a.iDataColumn=='undefined' || typeof a.aData=='undefined' ) typeof a.iDataColumn=='undefined' || typeof a.aData=='undefined' ||
typeof a.mDataProp=='undefined' )
{ {
mTmp = false; mTmp = false;
} }

View File

@ -29,7 +29,7 @@ $(document).ready( function () {
); );
oTest.fnWaitTest( oTest.fnWaitTest(
"Confirm that fnRender passes one argument (an object) with three parameters", "Confirm that fnRender passes two arguments with four parameters",
function () { function () {
mTmp = true; mTmp = true;
oSession.fnRestore(); oSession.fnRestore();
@ -39,8 +39,9 @@ $(document).ready( function () {
{ "mDataProp": "engine" }, { "mDataProp": "engine" },
{ {
"fnRender": function (a) { "fnRender": function (a) {
if ( arguments.length != 1 || typeof a.iDataRow=='undefined' || if ( arguments.length != 2 || typeof a.iDataRow=='undefined' ||
typeof a.iDataColumn=='undefined' || typeof a.aData=='undefined' ) typeof a.iDataColumn=='undefined' || typeof a.aData=='undefined' ||
typeof a.mDataProp=='undefined' )
{ {
mTmp = false; mTmp = false;
} }

View File

@ -27,7 +27,7 @@ $(document).ready( function () {
); );
oTest.fnWaitTest( oTest.fnWaitTest(
"Confirm that fnRender passes one argument (an object) with three parameters", "Confirm that fnRender passes two arguments with four parameters",
function () { function () {
mTmp = true; mTmp = true;
oSession.fnRestore(); oSession.fnRestore();
@ -37,8 +37,9 @@ $(document).ready( function () {
"aoColumns": [ "aoColumns": [
null, null,
{ "fnRender": function (a) { { "fnRender": function (a) {
if ( arguments.length != 1 || typeof a.iDataRow=='undefined' || if ( arguments.length != 2 || typeof a.iDataRow=='undefined' ||
typeof a.iDataColumn=='undefined' || typeof a.aData=='undefined' ) typeof a.iDataColumn=='undefined' || typeof a.aData=='undefined' ||
typeof a.mDataProp=='undefined' )
{ {
mTmp = false; mTmp = false;
} }