Skip to content

Commit

Permalink
update missing mock in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
yctercero committed Sep 3, 2020
1 parent f983e83 commit 0b3773d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { getUpdateRulesSchemaMock } from '../../../../../common/detection_engine
import { getPatchRulesSchemaMock } from '../../../../../common/detection_engine/schemas/request/patch_rules_schema.mock';
import { rulesMock } from './mock';
import { buildEsQuery } from 'src/plugins/data/common';
import { CreateRulesSchema } from '../../../../../common/detection_engine/schemas/request';
const abortCtrl = new AbortController();
const mockKibanaServices = KibanaServices.get as jest.Mock;
jest.mock('../../../../common/lib/kibana');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {
import { KibanaServices } from '../../../../common/lib/kibana';
import * as i18n from '../../../pages/detection_engine/rules/translations';
import { RulesSchema } from '../../../../../common/detection_engine/schemas/response';
import { updateRulesSchema } from '../../../../../common/detection_engine/schemas/request';

/**
* Create provided Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { act, renderHook } from '@testing-library/react-hooks';
import { coreMock } from '../../../../../../../../src/core/public/mocks';

import * as api from './api';
import { ruleMock } from './mock';
import { getRulesSchemaMock } from '../../../../../common/detection_engine/schemas/response/rules_bulk_schema.mocks';
import {
ReturnUseDissasociateExceptionList,
UseDissasociateExceptionListProps,
Expand All @@ -23,7 +23,7 @@ describe('useDissasociateExceptionList', () => {
const onSuccess = jest.fn();

beforeEach(() => {
jest.spyOn(api, 'patchRule').mockResolvedValue(ruleMock);
jest.spyOn(api, 'patchRule').mockResolvedValue(getRulesSchemaMock());
});

afterEach(() => {
Expand Down

0 comments on commit 0b3773d

Please sign in to comment.