Skip to content

Commit 2a83fe4

Browse files
author
priyanshu.solanki
committed
fixing test file for refreshaccesstoken to support instance uri
1 parent e103953 commit 2a83fe4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/sim/app/api/auth/oauth/utils.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ describe('OAuth Utils', () => {
159159

160160
const result = await refreshTokenIfNeeded('request-id', mockCredential, 'credential-id')
161161

162-
expect(mockRefreshOAuthToken).toHaveBeenCalledWith('google', 'refresh-token')
162+
expect(mockRefreshOAuthToken).toHaveBeenCalledWith('google', 'refresh-token', undefined)
163163
expect(mockDb.update).toHaveBeenCalled()
164164
expect(mockDb.set).toHaveBeenCalled()
165165
expect(result).toEqual({ accessToken: 'new-token', refreshed: true })
@@ -239,7 +239,7 @@ describe('OAuth Utils', () => {
239239

240240
const token = await refreshAccessTokenIfNeeded('credential-id', 'test-user-id', 'request-id')
241241

242-
expect(mockRefreshOAuthToken).toHaveBeenCalledWith('google', 'refresh-token')
242+
expect(mockRefreshOAuthToken).toHaveBeenCalledWith('google', 'refresh-token', undefined)
243243
expect(mockDb.update).toHaveBeenCalled()
244244
expect(mockDb.set).toHaveBeenCalled()
245245
expect(token).toBe('new-token')

0 commit comments

Comments
 (0)