Skip to content

Commit a1de8e2

Browse files
committed
test(organizations): give the home key principals the access field
1 parent 03bd14f commit a1de8e2

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

‎apps/sim/lib/organizations/application/home-widgets.integration.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,12 @@ describe('whose mail a widget reads', () => {
341341
serveProviders()
342342
await expect(
343343
readOrganizationHomeEmail.execute({
344-
principal: { kind: 'personal_api_key', userId: memberId, keyId: generateId() },
344+
principal: {
345+
kind: 'personal_api_key',
346+
userId: memberId,
347+
keyId: generateId(),
348+
access: 'write',
349+
},
345350
input,
346351
})
347352
).rejects.toBeInstanceOf(PrincipalKindAuthorizationError)

‎apps/sim/lib/organizations/application/home-workspaces.integration.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,12 @@ describe('whose workspaces the read covers', () => {
226226
it('takes a session only', async () => {
227227
await expect(
228228
readOrganizationHomeWorkspaceActivity.execute({
229-
principal: { kind: 'personal_api_key', userId: memberId, keyId: generateId() },
229+
principal: {
230+
kind: 'personal_api_key',
231+
userId: memberId,
232+
keyId: generateId(),
233+
access: 'write',
234+
},
230235
input,
231236
})
232237
).rejects.toBeInstanceOf(PrincipalKindAuthorizationError)

0 commit comments

Comments
 (0)