1
0
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:
Alex Corey 2020-04-28 16:26:46 -04:00
parent def3114b5b
commit c39423d5ca

View File

@ -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 () => {