@@ -158,7 +158,7 @@ describe('HTTP Server API V1', () => {
158158 test . todo ( 'should return 500 for internal server error' )
159159 } )
160160
161- describe ( 'POST /api/v1/workflow/:id/run ' , ( ) => {
161+ describe ( 'POST /api/v1/workflow/:id/execute ' , ( ) => {
162162 let workflowSpy
163163 let mockWorkflowFn
164164
@@ -191,7 +191,7 @@ describe('HTTP Server API V1', () => {
191191 test ( 'should return 202 and run the specified workflow' , async ( ) => {
192192 mockWorkflowFn . mockResolvedValueOnce ( )
193193 const response = await app
194- . post ( '/api/v1/workflow/test-workflow/run ' )
194+ . post ( '/api/v1/workflow/test-workflow/execute ' )
195195 . set ( 'Content-Type' , 'application/json' )
196196 . send ( { data : { some : 'data' } } )
197197
@@ -208,7 +208,7 @@ describe('HTTP Server API V1', () => {
208208 workflowsList : [ ]
209209 } )
210210 const response = await app
211- . post ( '/api/v1/workflow/invalid-workflow/run ' )
211+ . post ( '/api/v1/workflow/invalid-workflow/execute ' )
212212 . set ( 'Content-Type' , 'application/json' )
213213 . send ( { } )
214214
@@ -231,7 +231,7 @@ describe('HTTP Server API V1', () => {
231231 workflowsList : [ { id : 'test-workflow' , description : 'Test workflow' , isEnabled : false , isRequiredAdditionalData : false } ]
232232 } )
233233 const response = await app
234- . post ( '/api/v1/workflow/test-workflow/run ' )
234+ . post ( '/api/v1/workflow/test-workflow/execute ' )
235235 . set ( 'Content-Type' , 'application/json' )
236236 . send ( { } )
237237
@@ -254,7 +254,7 @@ describe('HTTP Server API V1', () => {
254254 workflowsList : [ { id : 'test-workflow' , description : 'Test workflow' , isEnabled : true , isRequiredAdditionalData : true } ]
255255 } )
256256 const response = await app
257- . post ( '/api/v1/workflow/test-workflow/run ' )
257+ . post ( '/api/v1/workflow/test-workflow/execute ' )
258258 . set ( 'Content-Type' , 'application/json' )
259259 . send ( { } )
260260
@@ -266,7 +266,7 @@ describe('HTTP Server API V1', () => {
266266 mockWorkflowFn . mockRejectedValueOnce ( new Error ( 'Something went wrong' ) )
267267
268268 const response = await app
269- . post ( '/api/v1/workflow/test-workflow/run ' )
269+ . post ( '/api/v1/workflow/test-workflow/execute ' )
270270 . set ( 'Content-Type' , 'application/json' )
271271 . send ( { data : { some : 'data' } } )
272272
0 commit comments