Skip to content

Commit e338f1c

Browse files
committed
update tests
1 parent f341802 commit e338f1c

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

src/server/auth/handlers/authorize.test.ts

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -218,38 +218,6 @@ describe('Authorization Handler', () => {
218218
});
219219
});
220220

221-
describe('Scope validation', () => {
222-
it('validates requested scopes against client registered scopes', async () => {
223-
const response = await supertest(app).get('/authorize').query({
224-
client_id: 'valid-client',
225-
redirect_uri: 'https://example.com/callback',
226-
response_type: 'code',
227-
code_challenge: 'challenge123',
228-
code_challenge_method: 'S256',
229-
scope: 'profile email admin' // 'admin' not in client scopes
230-
});
231-
232-
expect(response.status).toBe(302);
233-
const location = new URL(response.header.location);
234-
expect(location.searchParams.get('error')).toBe('invalid_scope');
235-
});
236-
237-
it('accepts valid scopes subset', async () => {
238-
const response = await supertest(app).get('/authorize').query({
239-
client_id: 'valid-client',
240-
redirect_uri: 'https://example.com/callback',
241-
response_type: 'code',
242-
code_challenge: 'challenge123',
243-
code_challenge_method: 'S256',
244-
scope: 'profile' // subset of client scopes
245-
});
246-
247-
expect(response.status).toBe(302);
248-
const location = new URL(response.header.location);
249-
expect(location.searchParams.has('code')).toBe(true);
250-
});
251-
});
252-
253221
describe('Resource parameter validation', () => {
254222
it('propagates resource parameter', async () => {
255223
const mockProviderWithResource = jest.spyOn(mockProvider, 'authorize');

0 commit comments

Comments
 (0)