🐛 Fix incorrect params handling on webhook processing task

This commit is contained in:
Andrey Antukh 2024-09-03 16:28:46 +02:00
parent 689aab32c9
commit 85444f5a47
4 changed files with 25 additions and 22 deletions

View file

@ -21,10 +21,9 @@
(with-mocks [submit-mock {:target 'app.worker/submit! :return nil}]
(let [prof (th/create-profile* 1 {:is-active true})
res (th/run-task! :process-webhook-event
{:event
{:type "command"
:name "create-project"
:props {:team-id (:default-team-id prof)}}})]
{:type "command"
:name "create-project"
:props {:team-id (:default-team-id prof)}})]
(t/is (= 0 (:call-count @submit-mock)))
(t/is (nil? res)))))
@ -34,10 +33,9 @@
(let [prof (th/create-profile* 1 {:is-active true})
whk (th/create-webhook* {:team-id (:default-team-id prof)})
res (th/run-task! :process-webhook-event
{:event
{:type "command"
:name "create-project"
:props {:team-id (:default-team-id prof)}}})]
{:type "command"
:name "create-project"
:props {:team-id (:default-team-id prof)}})]
(t/is (= 1 (:call-count @submit-mock)))
(t/is (nil? res)))))