diff --git a/src/screens/Organization/OrganizationEdit/OrganizationEdit.test.jsx b/src/screens/Organization/OrganizationEdit/OrganizationEdit.test.jsx
index 2277cd601b..c635652c99 100644
--- a/src/screens/Organization/OrganizationEdit/OrganizationEdit.test.jsx
+++ b/src/screens/Organization/OrganizationEdit/OrganizationEdit.test.jsx
@@ -10,8 +10,6 @@ jest.mock('@api');
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
describe('', () => {
- let api;
-
const mockData = {
name: 'Foo',
description: 'Bar',
@@ -22,23 +20,8 @@ describe('', () => {
}
};
- beforeEach(() => {
- api = {
- getInstanceGroups: jest.fn(),
- updateOrganizationDetails: jest.fn(),
- associateInstanceGroup: jest.fn(),
- disassociate: jest.fn(),
- };
- });
-
test('handleSubmit should call api update', () => {
- const wrapper = mountWithContexts(
- , { context: { network: {
- api,
- } } }
- );
+ const wrapper = mountWithContexts();
const updatedOrgData = {
name: 'new name',
@@ -51,13 +34,7 @@ describe('', () => {
});
test('handleSubmit associates and disassociates instance groups', async () => {
- const wrapper = mountWithContexts(
- , { context: { network: {
- api,
- } } }
- );
+ const wrapper = mountWithContexts();
const updatedOrgData = {
name: 'new name',
@@ -77,14 +54,8 @@ describe('', () => {
push: jest.fn(),
};
const wrapper = mountWithContexts(
- , { context: {
- network: {
- api: { api },
- },
- router: { history }
- } }
+ ,
+ { context: { router: { history } } }
);
expect(history.push).not.toHaveBeenCalled();