Skip to content

Commit

Permalink
testcase for LDEV-3413,deserializeJSON() for an empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
cfmitrah committed Oct 13, 2023
1 parent c86cfd2 commit f5cbcfc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/tickets/LDEV3413.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
component extends="org.lucee.cfml.test.LuceeTestCase" {
function run( testResults , testBox ) {
describe( title = "Testcase for LDEV3413, deserializeJSON() for an empty string ", body = function() {
it( title = "Testcase for LDEV3413, deserializeJSON() for an empty string", body = function( currentSpec ) {
expect(deserializeJSON('""')).toBe("");
expect( function(){
deserializeJSON("")
}).toThrow();
details = deserializeJSON( '{"company":"mitrahSoft"}' );
expect(details.company).toBe("mitrahSoft");
});
});
}
}

0 comments on commit f5cbcfc

Please sign in to comment.