Skip to content

Commit 64fb148

Browse files
committed
test(v1): pin the persistence primitive's governance argument on import
The primitive gained a required governance parameter; these assertions pinned the old arity. Asserting the value rather than anything() also pins that a keyType-less v1 credential imports ungoverned, matching the real helper.
1 parent 5052c9a commit 64fb148

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

apps/sim/app/api/v1/workflows/import/route.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ describe('POST /api/v1/workflows/import', () => {
272272
expect(mockSaveWorkflowToNormalizedTables).toHaveBeenCalledWith(
273273
'wf-new',
274274
expect.anything(),
275+
{ workspaceId: WORKSPACE_ID, subjectUserId: null },
275276
expect.anything()
276277
)
277278
})
@@ -375,7 +376,12 @@ describe('POST /api/v1/workflows/import', () => {
375376
await POST(makeRequest(validBody()))
376377

377378
const tx = { update: mockDbUpdate }
378-
expect(mockSaveWorkflowToNormalizedTables).toHaveBeenCalledWith('wf-new', expect.anything(), tx)
379+
expect(mockSaveWorkflowToNormalizedTables).toHaveBeenCalledWith(
380+
'wf-new',
381+
expect.anything(),
382+
{ workspaceId: WORKSPACE_ID, subjectUserId: null },
383+
tx
384+
)
379385
expect(mockDbUpdate).toHaveBeenCalled()
380386
})
381387

0 commit comments

Comments
 (0)