diff options
| author | eltrac <hi@eltr.ac> | 2026-10-30 11:46:40 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-10-30 11:46:40 +0800 |
| commit | a5f0d0dc9e73ba46a4ff974a256de770d70ac788 (patch) | |
| tree | 814f8d59a3dd1c76716fe181ad07f8e8ec4cb03f /test | |
| parent | dd4c7ca7850f166af4997912a3ded5639bd14a56 (diff) | |
test, webhook: tidy up webhook; add tests
- (send-webhook) does not need to validate URLs; (trigger) already does
that; replace validation logic with :pre conditional
- (make-request) does not need to fallback to empty string when
event-key is nil. it should never be nil.
Diffstat (limited to 'test')
| -rw-r--r-- | test/weepinbell/webhook_test.clj | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/weepinbell/webhook_test.clj b/test/weepinbell/webhook_test.clj index 593e709..f7530cc 100644 --- a/test/weepinbell/webhook_test.clj +++ b/test/weepinbell/webhook_test.clj @@ -89,7 +89,9 @@ (testing "Webhook constructing request options with custom functions" (let [custom-map {:body "customized!"}] (is (= (webhook/make-request :on-receive test-wm-data (fn [& _] custom-map)) - custom-map))))) + custom-map)))) + (testing "Unknown request-fn type" + (is (nil? (webhook/make-request :on-delete test-wm-data "I am a function"))))) (deftest make-actions-test (testing "Constructing action map" |
