summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoreltrac <hi@eltr.ac>2026-09-27 21:48:52 +0800
committereltrac <hi@eltr.ac>2026-09-27 21:48:52 +0800
commita52b1c74af318b7550711d360d202a3cc4e02805 (patch)
tree438ffb5042ddf086c26abe39d808945d0f2cb58e /test
parentcb8be6a76807107cb3bed7c600ad9cd973bb2af1 (diff)
webhook: fix AssertionError when event keys are not complete in user's config
Diffstat (limited to 'test')
-rw-r--r--test/weepinbell/webhook_test.clj8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/weepinbell/webhook_test.clj b/test/weepinbell/webhook_test.clj
index 7f7cc18..4df6b85 100644
--- a/test/weepinbell/webhook_test.clj
+++ b/test/weepinbell/webhook_test.clj
@@ -101,3 +101,11 @@
(is (= (webhook/make-actions nil nil) []))
(is (= (webhook/make-actions :default []) []))))
+(deftest make-hooks-test
+ (testing "Still need all four event keys even if config has less than four. (:on-create, :on-delete, :on-receive, :on-update)"
+ (let [config {:webhook {:on-create ["https://test.url/"]}}
+ hooks (webhook/make-hooks config)
+ hook-keys (set (keys hooks))
+ expected (set [:on-create :on-delete :on-receive :on-update])]
+ (is (= hook-keys expected)))))
+