blob: 3431068937f1ebaf0c09c2d7bfdfedf043fc6253 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import { getOAuthConfig } from '~/ide/lib/gitlab_web_ide/get_oauth_config';
describe('~/ide/lib/gitlab_web_ide/get_oauth_config', () => {
it('returns undefined if no clientId found', () => {
expect(getOAuthConfig({})).toBeUndefined();
});
it('returns auth config from dataset', () => {
expect(getOAuthConfig({ clientId: 'test-clientId', callbackUrl: 'test-callbackUrl' })).toEqual({
type: 'oauth',
clientId: 'test-clientId',
callbackUrl: 'test-callbackUrl',
protectRefreshToken: true,
});
});
});
|