Skip to content

Commit b7bc591

Browse files
waleedlatif1claude
andcommitted
fix: update test assertions for new encryptedPassword parameter
Tests now expect the encryptedPassword arg passed to validateAuthToken and setDeploymentAuthCookie after the password-binding change. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 78c0454 commit b7bc591

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

apps/sim/app/api/chat/utils.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ describe('Chat API Utils', () => {
105105
} as any
106106

107107
const result = await validateChatAuth('request-id', deployment, mockRequest)
108-
expect(mockValidateAuthToken).toHaveBeenCalledWith('valid-token', 'chat-id')
108+
expect(mockValidateAuthToken).toHaveBeenCalledWith('valid-token', 'chat-id', 'encrypted-password')
109109
expect(result.authorized).toBe(true)
110110
})
111111

@@ -142,7 +142,8 @@ describe('Chat API Utils', () => {
142142
mockResponse,
143143
'chat',
144144
'test-chat-id',
145-
'password'
145+
'password',
146+
undefined
146147
)
147148
})
148149
})

apps/sim/app/api/form/utils.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe('Form API Utils', () => {
7575
} as any
7676

7777
const result = await validateFormAuth('request-id', deployment, mockRequest)
78-
expect(mockValidateAuthToken).toHaveBeenCalledWith('valid-token', 'form-id')
78+
expect(mockValidateAuthToken).toHaveBeenCalledWith('valid-token', 'form-id', 'encrypted-password')
7979
expect(result.authorized).toBe(true)
8080
})
8181

@@ -112,7 +112,8 @@ describe('Form API Utils', () => {
112112
mockResponse,
113113
'form',
114114
'test-form-id',
115-
'password'
115+
'password',
116+
undefined
116117
)
117118
})
118119
})

0 commit comments

Comments
 (0)