Skip to content

Commit 26714e0

Browse files
fatmcgavclaude
andcommitted
test(web): update connect and callback route tests for offline_access injection
Both mocks asserted `clientMetadata.scope === 'repo'`; the scope is now `'offline_access repo'` after the fix in the previous commit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 96c446e commit 26714e0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/web/src/app/api/(server)/ee/askmcp/callback/route.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ describe('GET /api/ee/askmcp/callback', () => {
150150
const state = createMcpOAuthState('state-1', '/settings/workspaceAskAgent');
151151
mocks.mcpAuth.mockImplementation(async (provider) => {
152152
expect('saveClientInformation' in provider).toBe(false);
153-
expect(provider.clientMetadata.scope).toBe('repo');
153+
expect(provider.clientMetadata.scope).toBe('offline_access repo');
154154
await provider.invalidateCredentials('all');
155155
const error = new Error('invalid_client client_secret=client-secret refresh_token=refresh-token');
156156
Object.assign(error, {

packages/web/src/app/api/(server)/ee/askmcp/connect/route.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ describe('POST /api/ee/askmcp/connect', () => {
148148
mocks.mcpAuth.mockImplementation(async (provider, options) => {
149149
expect('saveClientInformation' in provider).toBe(true);
150150
expect(provider.saveClientInformation).toEqual(expect.any(Function));
151-
expect(provider.clientMetadata.scope).toBe('repo');
151+
expect(provider.clientMetadata.scope).toBe('offline_access repo');
152152
expect(options.fetchFn).toEqual(expect.any(Function));
153153

154154
await provider.saveClientInformation({ client_id: 'client-1' });

0 commit comments

Comments
 (0)