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(
"Confirm that fnRender passes one argument (an object) with three parameters",
"Confirm that fnRender passes two arguments with four parameters",
function () {
mTmp = true;
oSession.fnRestore();
oTable = $('#example').dataTable( {
"aoColumns": [
null,
{ "fnRender": function (a) {
if ( arguments.length != 1 || typeof a.iDataRow=='undefined' ||
typeof a.iDataColumn=='undefined' || typeof a.aData=='undefined' )
{ "fnRender": function (a, v) {
if ( arguments.length != 2 || typeof a.iDataRow=='undefined' ||
typeof a.iDataColumn=='undefined' || typeof a.aData=='undefined' ||
typeof a.mDataProp=='undefined' )
{
mTmp = false;
}

View File

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

View File

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

View File

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

View File

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

View File

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