2019-05-29 08:39:54 -04:00
|
|
|
import getUserManagerForOpenIdConnectClient from './getUserManagerForOpenIdConnectClient.js';
|
2019-04-29 15:42:21 -04:00
|
|
|
|
|
|
|
|
describe('getUserManagerForOpenIdConnectClient', () => {
|
|
|
|
|
it('returns undefined if store is not provided', () => {
|
2019-05-29 08:39:54 -04:00
|
|
|
const expectedReturnVal = undefined;
|
|
|
|
|
const returnVal = getUserManagerForOpenIdConnectClient(undefined, {});
|
2019-04-29 15:42:21 -04:00
|
|
|
|
2019-05-29 08:39:54 -04:00
|
|
|
expect(returnVal).toEqual(expectedReturnVal);
|
|
|
|
|
});
|
2019-04-29 15:42:21 -04:00
|
|
|
|
|
|
|
|
it('returns undefined if oidcSettings are not provided', () => {
|
2019-05-29 08:39:54 -04:00
|
|
|
const expectedReturnVal = undefined;
|
|
|
|
|
const returnVal = getUserManagerForOpenIdConnectClient({}, undefined);
|
2019-04-29 15:42:21 -04:00
|
|
|
|
2019-05-29 08:39:54 -04:00
|
|
|
expect(returnVal).toEqual(expectedReturnVal);
|
|
|
|
|
});
|
2019-04-29 15:52:04 -04:00
|
|
|
|
|
|
|
|
it('does not return undefined when store and oidcSettings are defined', () => {
|
2019-05-29 08:39:54 -04:00
|
|
|
const returnVal = getUserManagerForOpenIdConnectClient({}, {});
|
2019-04-29 15:52:04 -04:00
|
|
|
|
2019-05-29 08:39:54 -04:00
|
|
|
expect(returnVal).not.toBe(undefined);
|
|
|
|
|
});
|
|
|
|
|
});
|