mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
28 lines
678 B
React
28 lines
678 B
React
|
import React from 'react';
|
||
|
import { mount } from 'enzyme';
|
||
|
import SelectableCard from '../../src/components/AddRole/SelectableCard';
|
||
|
|
||
|
describe('<SelectableCard />', () => {
|
||
|
let wrapper;
|
||
|
const onClick = jest.fn();
|
||
|
test('initially renders without crashing when not selected', () => {
|
||
|
wrapper = mount(
|
||
|
<SelectableCard
|
||
|
onClick={onClick}
|
||
|
/>
|
||
|
);
|
||
|
expect(wrapper.length).toBe(1);
|
||
|
wrapper.unmount();
|
||
|
});
|
||
|
test('initially renders without crashing when selected', () => {
|
||
|
wrapper = mount(
|
||
|
<SelectableCard
|
||
|
isSelected
|
||
|
onClick={onClick}
|
||
|
/>
|
||
|
);
|
||
|
expect(wrapper.length).toBe(1);
|
||
|
wrapper.unmount();
|
||
|
});
|
||
|
});
|