Skip to content

Commit

Permalink
Added the test cases for LDEV-5173.
Browse files Browse the repository at this point in the history
  • Loading branch information
cfmitrah committed Dec 11, 2024
1 parent 656d2b3 commit 4cc25d9
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/tickets/LDEV5173.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
component extends = "org.lucee.cfml.test.LuceeTestCase"{
function run( testResults, testBox ){
describe( "Test for LDEV-5173", function() {
beforeEach( function(){
variables.startingTZ=getTimeZone();
setTimeZone("IST");
});
afterEach( function(){
setTimeZone(variables.startingTZ?:"UTC");
});
it( title="parseDateTime with format 'epoch'", body=function( currentSpec ) {
date = DateTimeFormat( datetime="2024/12/11 16:19:54", mask="epoch" );
expect(toString(parseDateTime(date=date, format="epoch"))).toBe("{ts '2024-12-11 16:19:54'}");
});
it( title="parseDateTime with format 'epochms'", body=function( currentSpec ) {
date = DateTimeFormat( datetime="2024/12/11 16:19:54", mask="epochms" );
expect(toString(parseDateTime(date=date, format="epochms"))).toBe("{ts '2024-12-11 16:19:54'}");
});
} );
}
}

0 comments on commit 4cc25d9

Please sign in to comment.