Fix use of fake ObjectIds in tests

12 character strings are no longer valid see:
https://github.com/mongodb/js-bson/releases/tag/v6.0.0 (Strings of
length 12 can no longer make an ObjectId)

GitOrigin-RevId: 2590c10915c50b951f991b2cf161d80235e445ca
This commit is contained in:
andrew rumble 2024-08-16 10:27:36 +01:00 committed by Copybot
parent 9180d85c87
commit 5b1c0c5008
3 changed files with 4 additions and 4 deletions

View file

@ -13,7 +13,7 @@ const MODULE_PATH = Path.join(
describe('CollaboratorsGetter', function () {
beforeEach(function () {
this.userId = 'mock-user-id'
this.userId = 'efb93a186e9a06f15fea5abd'
this.ownerRef = new ObjectId()
this.readOnlyRef1 = new ObjectId()
this.readOnlyRef2 = new ObjectId()

View file

@ -307,7 +307,7 @@ describe('SubscriptionUpdater', function () {
it('should not remove the subscription when expired if it has Group SSO enabled', async function () {
this.Features.hasFeature.withArgs('saas').returns(true)
this.subscription.ssoConfig = new ObjectId('abc123abc123')
this.subscription.ssoConfig = new ObjectId('abc123abc123abc123abc123')
this.recurlySubscription.state = 'expired'
await this.SubscriptionUpdater.promises.updateSubscriptionFromRecurly(

View file

@ -260,7 +260,7 @@ describe('TeamInvitesHandler', function () {
})
it('sends an SSO invite if SSO is enabled and inviting self', function (done) {
this.subscription.ssoConfig = new ObjectId('abc123abc123')
this.subscription.ssoConfig = new ObjectId('abc123abc123abc123abc123')
this.SSOConfig.findById
.withArgs(this.subscription.ssoConfig)
.resolves({ enabled: true })
@ -282,7 +282,7 @@ describe('TeamInvitesHandler', function () {
})
it('does not send an SSO invite if SSO is disabled and inviting self', function (done) {
this.subscription.ssoConfig = new ObjectId('abc123abc123')
this.subscription.ssoConfig = new ObjectId('abc123abc123abc123abc123')
this.SSOConfig.findById
.withArgs(this.subscription.ssoConfig)
.resolves({ enabled: false })