Skip to content

Commit 79a973f

Browse files
committed
fix failing tests
1 parent 684563b commit 79a973f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

apps/sim/app/api/workspaces/invitations/route.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,16 @@ describe('Workspace Invitations API Route', () => {
101101
eq: vi.fn().mockImplementation((field, value) => ({ type: 'eq', field, value })),
102102
inArray: vi.fn().mockImplementation((field, values) => ({ type: 'inArray', field, values })),
103103
}))
104+
105+
vi.doMock('@/executor/utils/permission-check', () => ({
106+
validateInvitationsAllowed: vi.fn().mockResolvedValue(undefined),
107+
InvitationsNotAllowedError: class InvitationsNotAllowedError extends Error {
108+
constructor() {
109+
super('Invitations are not allowed based on your permission group settings')
110+
this.name = 'InvitationsNotAllowedError'
111+
}
112+
},
113+
}))
104114
})
105115

106116
describe('GET /api/workspaces/invitations', () => {

0 commit comments

Comments
 (0)