Skip to content

Commit

Permalink
user query test failure fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nitintwt committed Nov 17, 2024
1 parent 78ab134 commit 19f266c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/resolvers/Query/userAccess.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ beforeAll(async () => {

const org = await Organization.create({
creatorId: adminUser?.id,
members: [anotherTestUser?.id],
members: [anotherTestUser?._id],
admins: [adminUser?.id],
name: "Test Organization",
description: "A test organization for user query testing",
Expand Down Expand Up @@ -82,7 +82,7 @@ describe("user Query", () => {
};

const context = {
userId: testUser?.id,
userId: new Types.ObjectId().toString(),
};

try {
Expand Down Expand Up @@ -126,7 +126,7 @@ describe("user Query", () => {
};

const org = await Organization.findOne({ admins: adminUser?.id });
expect(org?.members).toContain(anotherTestUser?.id);
expect(org?.members).toContain(anotherTestUser?._id);

const result = await userResolver?.({}, args, context);

Expand Down

0 comments on commit 19f266c

Please sign in to comment.