From eb449c489bebfebd1760d800c4cf92392a4ffe1c Mon Sep 17 00:00:00 2001 From: Daniel Diaz <39510674+IslandRhythms@users.noreply.github.com> Date: Mon, 12 Feb 2024 11:26:20 -0500 Subject: [PATCH] fix id generation --- test/model.hydrate.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/model.hydrate.test.js b/test/model.hydrate.test.js index cabdf7d225f..51358f08aa9 100644 --- a/test/model.hydrate.test.js +++ b/test/model.hydrate.test.js @@ -111,8 +111,8 @@ describe('model', function() { const User = db.model('UserTestHydrate', userSchema); const Company = db.model('CompanyTestHyrdrate', companySchema); - const users = [{ _id: new Schema.ObjectId(), name: 'Val'}]; - const company = { _id: new Schema.ObjectId(), name: 'Booster', users: [users[0]] }; + const users = [{ _id: new mongoose.Types.ObjectId(), name: 'Val'}]; + const company = { _id: new mongoose.Types.ObjectId(), name: 'Booster', users: [users[0]] }; const C = Company.hydrate(company, null, { hydratedPopulatedDocs: true }); assert.equal(C.users[0].name, 'Val');