fix(settings): resume DingTalk space registration after login
This commit is contained in:
@@ -11,8 +11,10 @@ describe('DingTalk session client', () => {
|
||||
}), { status: 201 }))
|
||||
vi.stubGlobal('fetch', fetchMock)
|
||||
|
||||
await expect(startDingtalkSession()).resolves.toMatchObject({ id: 'session-1', state: 'starting' })
|
||||
const target = 'https://alidocs.dingtalk.com/i/spaces/9JOGOQneRgkneX4Q/overview'
|
||||
await expect(startDingtalkSession(target)).resolves.toMatchObject({ id: 'session-1', state: 'starting' })
|
||||
expect(fetchMock).toHaveBeenCalledWith('/api/v1/dingtalk-session', expect.objectContaining({ method: 'POST' }))
|
||||
expect(JSON.parse(String(fetchMock.mock.calls[0][1]?.body))).toEqual({ space: target })
|
||||
})
|
||||
|
||||
it('preserves login_required as a machine-readable error for automatic QR fallback', async () => {
|
||||
|
||||
Reference in New Issue
Block a user