Skip to content

Commit

Permalink
fix test, force MongoDBID to be a struct
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Dec 10, 2024
1 parent 1119906 commit 86f3ea8
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions test/datasource/MongoDB.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,14 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="mongodb" {
assertEquals(isNull(byid),true)
}

public void function testMongoDBID() skip="isNotSupported" {
var id = MongoDBID();
// TODO something changed with testbox
var objectId = deserializeJson(serializeJson(id)).objectId; // HACK
$assert.key(objectId,"date");
$assert.key(objectId,"timestamp");
//$assert.key(objectId,"id");
public void function testMongoDBID_orig() skip="isNotSupported" {
if(isNotSupported()) return;
var _id = MongoDBID();
var id = {}; // workaround https://ortussolutions.atlassian.net/browse/TESTBOX-370
structAppend(id, _id);
$assert.key(id,"date");
$assert.key(id,"timestamp");
$assert.key(id,"id");

var dateSeed = now().add("d",-1)
id = MongoDBID(dateSeed);
Expand Down

0 comments on commit 86f3ea8

Please sign in to comment.