2021-04-29 21:17:54 +05:30
|
|
|
import { getParsedDataset } from '~/pages/admin/application_settings/utils';
|
|
|
|
import { rawMockData, mockData } from './mock_data';
|
|
|
|
|
|
|
|
describe('utils', () => {
|
|
|
|
describe('getParsedDataset', () => {
|
|
|
|
it('returns correct results', () => {
|
|
|
|
expect(
|
|
|
|
getParsedDataset({
|
|
|
|
dataset: rawMockData,
|
|
|
|
booleanAttributes: [
|
|
|
|
'signupEnabled',
|
|
|
|
'requireAdminApprovalAfterUserSignup',
|
|
|
|
'domainDenylistEnabled',
|
|
|
|
'denylistTypeRawSelected',
|
|
|
|
'emailRestrictionsEnabled',
|
2022-08-13 15:12:31 +05:30
|
|
|
'passwordNumberRequired',
|
|
|
|
'passwordLowercaseRequired',
|
|
|
|
'passwordUppercaseRequired',
|
|
|
|
'passwordSymbolRequired',
|
2021-04-29 21:17:54 +05:30
|
|
|
],
|
|
|
|
}),
|
|
|
|
).toEqual(mockData);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|