HichamELBSI 43ee492fcb Init Users & Permissions settings section
Signed-off-by: HichamELBSI <elabbassih@gmail.com>
2020-08-03 17:11:58 +02:00

18 lines
489 B
JavaScript

import React from 'react';
import { mount, shallow } from 'enzyme';
import { Initializer } from '../index';
describe('<Initializer />', () => {
it('should not crash', () => {
shallow(<Initializer updatePlugin={jest.fn()} />);
});
it('should call the updatePlugin props on mount', () => {
const props = { updatePlugin: jest.fn() };
mount(<Initializer {...props} />);
expect(props.updatePlugin).toHaveBeenCalledWith('users-permissions', 'isReady', true);
});
});