Skip to content

Commit

Permalink
Added a testcase in queryMap() function for LDEV-4665 (#2211)
Browse files Browse the repository at this point in the history
* Added a testcase in queryMap() function for LDEV-4665

* Update LDEV4665.cfc
  • Loading branch information
cfmitrah authored Aug 14, 2023
1 parent 65e1774 commit bcf87bd
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion test/tickets/LDEV4665.cfc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
component extends="org.lucee.cfml.test.LuceeTestCase" skip=true {
component extends="org.lucee.cfml.test.LuceeTestCase" skip="true" {

function beforeAll(){
variables.qry = queryNew(
Expand Down Expand Up @@ -26,6 +26,18 @@ component extends="org.lucee.cfml.test.LuceeTestCase" skip=true {
expect( test[3] ).toBe( qry.id[3] );
expect( test[3].len() ).toBe( qry.id[3].len() )
});

it(title = "Checking queryMap() function", body = function( currentSpec ) {
var test = queryMap(qry,(row) => row).columnData("id");
expect( test[3] ).toBe( qry.id[3] );
expect( test[3].len() ).toBe( qry.id[3].len() )
});

it(title = "Checking queryMap() with member function", body = function( currentSpec ) {
var test = qry.map((row) => row).columnData("id");
expect( test[3] ).toBe( qry.id[3] );
expect( test[3].len() ).toBe( qry.id[3].len() )
});
});
}
}

0 comments on commit bcf87bd

Please sign in to comment.