mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-13 12:55:19 +00:00
fix tests
This commit is contained in:
parent
344ff5f100
commit
c7e2f5ae06
2 changed files with 8 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { SINGLE_TENANT_ORG_DOMAIN, SINGLE_TENANT_ORG_ID, SINGLE_TENANT_ORG_NAME } from '@/lib/constants';
|
||||
import { ApiKey, Org, PrismaClient, User } from '@prisma/client';
|
||||
import { beforeEach } from 'vitest';
|
||||
import { beforeEach, vi } from 'vitest';
|
||||
import { mockDeep, mockReset } from 'vitest-mock-extended';
|
||||
|
||||
beforeEach(() => {
|
||||
|
|
@ -43,6 +43,8 @@ export const MOCK_USER: User = {
|
|||
updatedAt: new Date(),
|
||||
hashedPassword: null,
|
||||
emailVerified: null,
|
||||
image: null
|
||||
image: null,
|
||||
permissionSyncedAt: null
|
||||
}
|
||||
|
||||
export const userScopedPrismaClientExtension = vi.fn();
|
||||
|
|
@ -188,6 +188,7 @@ describe('getAuthContext', () => {
|
|||
},
|
||||
org: MOCK_ORG,
|
||||
role: OrgRole.MEMBER,
|
||||
prisma: undefined,
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -217,6 +218,7 @@ describe('getAuthContext', () => {
|
|||
},
|
||||
org: MOCK_ORG,
|
||||
role: OrgRole.OWNER,
|
||||
prisma: undefined,
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -241,6 +243,7 @@ describe('getAuthContext', () => {
|
|||
},
|
||||
org: MOCK_ORG,
|
||||
role: OrgRole.GUEST,
|
||||
prisma: undefined,
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -256,6 +259,7 @@ describe('getAuthContext', () => {
|
|||
user: undefined,
|
||||
org: MOCK_ORG,
|
||||
role: OrgRole.GUEST,
|
||||
prisma: undefined,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue