mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
Fixes failing test
This commit is contained in:
parent
def3114b5b
commit
c39423d5ca
@ -2,9 +2,27 @@ import React from 'react';
|
||||
import { mountWithContexts } from '@testUtils/enzymeHelpers';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import { createMemoryHistory } from 'history';
|
||||
import { HostsAPI } from '@api';
|
||||
import InventoryHostGroups from './InventoryHostGroups';
|
||||
|
||||
jest.mock('@api');
|
||||
HostsAPI.readAllGroups.mockResolvedValue({
|
||||
data: {
|
||||
count: 1,
|
||||
results: [
|
||||
{
|
||||
id: 1,
|
||||
url: 'www.google.com',
|
||||
summary_fields: {
|
||||
inventory: { id: 1, name: 'foo' },
|
||||
user_capabilities: { edit: true },
|
||||
},
|
||||
name: 'Bar',
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
HostsAPI.readGroupsOptions.mockResolvedValue({ data: { actions: {} } });
|
||||
|
||||
describe('<InventoryHostGroups />', () => {
|
||||
test('initially renders successfully', async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user