Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/sim/app/api/auth/oauth/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@

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

expect(mockRefreshOAuthToken).toHaveBeenCalledWith('google', 'refresh-token')
expect(mockRefreshOAuthToken).toHaveBeenCalledWith('google', 'refresh-token', undefined)

Check failure on line 166 in apps/sim/app/api/auth/oauth/utils.test.ts

View workflow job for this annotation

GitHub Actions / Test and Build / Test and Build

app/api/auth/oauth/utils.test.ts > OAuth Utils > refreshTokenIfNeeded > should refresh token when expired

AssertionError: expected "spy" to be called with arguments: [ Array(3) ] Received: 1st spy call: [ "google", "refresh-token", - undefined, ] Number of calls: 1 ❯ app/api/auth/oauth/utils.test.ts:166:37
expect(mockDb.update).toHaveBeenCalled()
expect(mockDb.set).toHaveBeenCalled()
expect(result).toEqual({ accessToken: 'new-token', refreshed: true })
Expand Down Expand Up @@ -251,7 +251,7 @@

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

expect(mockRefreshOAuthToken).toHaveBeenCalledWith('google', 'refresh-token')
expect(mockRefreshOAuthToken).toHaveBeenCalledWith('google', 'refresh-token', undefined)

Check failure on line 254 in apps/sim/app/api/auth/oauth/utils.test.ts

View workflow job for this annotation

GitHub Actions / Test and Build / Test and Build

app/api/auth/oauth/utils.test.ts > OAuth Utils > refreshAccessTokenIfNeeded > should refresh token when expired

AssertionError: expected "spy" to be called with arguments: [ Array(3) ] Received: 1st spy call: [ "google", "refresh-token", - undefined, ] Number of calls: 1 ❯ app/api/auth/oauth/utils.test.ts:254:37
expect(mockDb.update).toHaveBeenCalled()
expect(mockDb.set).toHaveBeenCalled()
expect(token).toBe('new-token')
Expand Down
Loading
Loading