Skip to content

Commit

Permalink
renamed route file for connectorTypesRoute
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmorris committed Mar 4, 2021
1 parent c750557 commit 97e2549
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { listActionTypesRoute } from './list_action_types';
import { connectorTypesRoute } from './connector_types';
import { httpServiceMock } from 'src/core/server/mocks';
import { licenseStateMock } from '../lib/license_state.mock';
import { mockHandlerArguments } from './legacy/_mock_handler_arguments';
Expand All @@ -22,12 +22,12 @@ beforeEach(() => {
(verifyAccessAndContext as jest.Mock).mockImplementation((license, handler) => handler);
});

describe('listActionTypesRoute', () => {
describe('connectorTypesRoute', () => {
it('lists action types with proper parameters', async () => {
const licenseState = licenseStateMock.create();
const router = httpServiceMock.createRouter();

listActionTypesRoute(router, licenseState);
connectorTypesRoute(router, licenseState);

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

Expand Down Expand Up @@ -81,7 +81,7 @@ describe('listActionTypesRoute', () => {
const licenseState = licenseStateMock.create();
const router = httpServiceMock.createRouter();

listActionTypesRoute(router, licenseState);
connectorTypesRoute(router, licenseState);

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

Expand Down Expand Up @@ -122,7 +122,7 @@ describe('listActionTypesRoute', () => {
throw new Error('OMG');
});

listActionTypesRoute(router, licenseState);
connectorTypesRoute(router, licenseState);

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const rewriteBodyRes: RewriteResponseCase<ActionType[]> = (results) => {
}));
};

export const listActionTypesRoute = (
export const connectorTypesRoute = (
router: IRouter<ActionsRequestHandlerContext>,
licenseState: ILicenseState
) => {
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/actions/server/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { deleteActionRoute } from './delete';
import { executeActionRoute } from './execute';
import { getActionRoute } from './get';
import { getAllActionRoute } from './get_all';
import { listActionTypesRoute } from './list_action_types';
import { connectorTypesRoute } from './connector_types';
import { updateActionRoute } from './update';
import * as legacy from './legacy';

Expand All @@ -37,7 +37,7 @@ export function defineRoutes(
updateActionRoute(router, licenseState);

legacy.listActionTypesRoute(router, licenseState);
listActionTypesRoute(router, licenseState);
connectorTypesRoute(router, licenseState);

legacy.executeActionRoute(router, licenseState);
executeActionRoute(router, licenseState);
Expand Down

0 comments on commit 97e2549

Please sign in to comment.