Skip to content

Commit

Permalink
add missing test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jcger committed Nov 25, 2024
1 parent 33fcdb8 commit a90cabb
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { RuleAction, RuleSystemAction, SanitizedRule } from '../../../../types';
import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks';
import { usageCountersServiceMock } from '@kbn/usage-collection-plugin/server/usage_counters/usage_counters_service.mock';
import { actionsClientMock } from '@kbn/actions-plugin/server/mocks';
import { docLinksServiceMock } from '@kbn/core/server/mocks';

const rulesClient = rulesClientMock.create();

Expand All @@ -30,6 +31,7 @@ beforeEach(() => {
});

describe('createRuleRoute', () => {
const docLinks = docLinksServiceMock.createSetupContract();
const createdAt = new Date();
const updatedAt = new Date();
const action: RuleAction = {
Expand Down Expand Up @@ -151,6 +153,7 @@ describe('createRuleRoute', () => {
licenseState,
encryptedSavedObjects,
usageCounter: mockUsageCounter,
docLinks,
});

const [config, handler] = router.post.mock.calls[0];
Expand Down Expand Up @@ -264,6 +267,7 @@ describe('createRuleRoute', () => {
licenseState,
encryptedSavedObjects,
usageCounter: mockUsageCounter,
docLinks,
});

const [config, handler] = router.post.mock.calls[0];
Expand Down Expand Up @@ -381,6 +385,7 @@ describe('createRuleRoute', () => {
licenseState,
encryptedSavedObjects,
usageCounter: mockUsageCounter,
docLinks,
});

const [config, handler] = router.post.mock.calls[0];
Expand Down Expand Up @@ -628,7 +633,7 @@ describe('createRuleRoute', () => {
throw new Error('OMG');
});

createRuleRoute({ router, licenseState, encryptedSavedObjects });
createRuleRoute({ router, licenseState, encryptedSavedObjects, docLinks });

const [, handler] = router.post.mock.calls[0];

Expand All @@ -646,7 +651,7 @@ describe('createRuleRoute', () => {
const router = httpServiceMock.createRouter();
const encryptedSavedObjects = encryptedSavedObjectsMock.createSetup({ canEncrypt: true });

createRuleRoute({ router, licenseState, encryptedSavedObjects });
createRuleRoute({ router, licenseState, encryptedSavedObjects, docLinks });

const [, handler] = router.post.mock.calls[0];

Expand Down Expand Up @@ -677,6 +682,7 @@ describe('createRuleRoute', () => {
licenseState,
encryptedSavedObjects,
usageCounter: mockUsageCounter,
docLinks,
});

const [_, handler] = router.post.mock.calls[0];
Expand Down Expand Up @@ -759,6 +765,7 @@ describe('createRuleRoute', () => {
licenseState,
encryptedSavedObjects,
usageCounter: mockUsageCounter,
docLinks,
});

const [_, handler] = router.post.mock.calls[0];
Expand Down Expand Up @@ -815,6 +822,7 @@ describe('createRuleRoute', () => {
licenseState,
encryptedSavedObjects,
usageCounter: mockUsageCounter,
docLinks,
});

const [_, handler] = router.post.mock.calls[0];
Expand Down

0 comments on commit a90cabb

Please sign in to comment.