@@ -8,7 +8,7 @@ import { ActionType, Services, ActionTypeExecutorOptions } from '../types';
88import { savedObjectsClientMock } from '../../../../../src/core/server/mocks' ;
99import { validateParams , validateSecrets } from '../lib' ;
1010import { getActionType } from './slack' ;
11- import { configUtilsMock } from '../actions_config.mock' ;
11+ import { actionsConfigMock } from '../actions_config.mock' ;
1212
1313const ACTION_TYPE_ID = '.slack' ;
1414
@@ -22,7 +22,7 @@ let actionType: ActionType;
2222beforeAll ( ( ) => {
2323 actionType = getActionType ( {
2424 async executor ( options : ActionTypeExecutorOptions ) : Promise < any > { } ,
25- configurationUtilities : configUtilsMock ,
25+ configurationUtilities : actionsConfigMock . create ( ) ,
2626 } ) ;
2727} ) ;
2828
@@ -85,7 +85,7 @@ describe('validateActionTypeSecrets()', () => {
8585 test ( 'should validate and pass when the slack webhookUrl is whitelisted' , ( ) => {
8686 actionType = getActionType ( {
8787 configurationUtilities : {
88- ...configUtilsMock ,
88+ ...actionsConfigMock . create ( ) ,
8989 ensureWhitelistedUri : url => {
9090 expect ( url ) . toEqual ( 'https://api.slack.com/' ) ;
9191 } ,
@@ -100,7 +100,7 @@ describe('validateActionTypeSecrets()', () => {
100100 test ( 'config validation returns an error if the specified URL isnt whitelisted' , ( ) => {
101101 actionType = getActionType ( {
102102 configurationUtilities : {
103- ...configUtilsMock ,
103+ ...actionsConfigMock . create ( ) ,
104104 ensureWhitelistedHostname : url => {
105105 throw new Error ( `target hostname is not whitelisted` ) ;
106106 } ,
@@ -135,7 +135,7 @@ describe('execute()', () => {
135135
136136 actionType = getActionType ( {
137137 executor : mockSlackExecutor ,
138- configurationUtilities : configUtilsMock ,
138+ configurationUtilities : actionsConfigMock . create ( ) ,
139139 } ) ;
140140 } ) ;
141141
0 commit comments