mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-06 08:01:48 -05:00
* convert Org list to use PaginatedDataList * add ToolbarAddButton, ToolbarDeleteButton * pass full org into OrganizationListItem
30 lines
920 B
JavaScript
30 lines
920 B
JavaScript
import React from 'react';
|
|
import { MemoryRouter } from 'react-router-dom';
|
|
import { I18nProvider } from '@lingui/react';
|
|
import { mountWithContexts } from '../../../enzymeHelpers';
|
|
import OrganizationListItem from '../../../../src/pages/Organizations/components/OrganizationListItem';
|
|
|
|
describe('<OrganizationListItem />', () => {
|
|
test('initially renders succesfully', () => {
|
|
mountWithContexts(
|
|
<I18nProvider>
|
|
<MemoryRouter initialEntries={['/organizations']} initialIndex={0}>
|
|
<OrganizationListItem
|
|
organization={{
|
|
id: 1,
|
|
name: 'Org',
|
|
summary_fields: { related_field_counts: {
|
|
users: 1,
|
|
teams: 1,
|
|
} }
|
|
}}
|
|
detailUrl="/organization/1"
|
|
isSelected
|
|
onSelect={() => {}}
|
|
/>
|
|
</MemoryRouter>
|
|
</I18nProvider>
|
|
);
|
|
});
|
|
});
|