diff --git a/src/automations/index.js b/src/automations/index.js index e0cb4bfc..12b77279 100644 --- a/src/automations/index.js +++ b/src/automations/index.js @@ -37,9 +37,9 @@ export default class Automations { } return this.app.request.post({ - url : `${this.app.urls.automationFlowTrigger()}/activate-by-name`, + url : `${this.app.urls.automationFlowTrigger()}/activate-by-name`, query: { flowName, triggerName }, - data, + data : data || {}, }) } } diff --git a/test/unit/specs/automations/basic.js b/test/unit/specs/automations/basic.js index 60d0a498..80ff5690 100644 --- a/test/unit/specs/automations/basic.js +++ b/test/unit/specs/automations/basic.js @@ -78,6 +78,7 @@ describe(' Basic', function() { expect(req1).to.deep.include({ method: 'POST', path : `${APP_PATH}/automation/flow/trigger/activate-by-name?flowName=${FLOW_NAME}&triggerName=${TRIGGER_NAME}`, + body : {}, }) expect(req2).to.deep.include({