From b40e75e37dd4c8788e8baa092e9077b5c83db7f6 Mon Sep 17 00:00:00 2001 From: Phillip Davis Date: Tue, 3 Mar 2026 15:34:19 -0500 Subject: [PATCH] test(webhook): non-POST method produces no output --- test/property/test_webhook_handler.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/property/test_webhook_handler.rb b/test/property/test_webhook_handler.rb index b7a8a764780028d98878e112bac30e6eb9bb9c57..93fcd2eaa160ec2928dc8494957d622ae216a654 100644 --- a/test/property/test_webhook_handler.rb +++ b/test/property/test_webhook_handler.rb @@ -427,4 +427,15 @@ class WebhookPropertyTest < Minitest::Test } end em :test_request_with_non_root_uri_produces_no_output + + def test_request_with_non_post_method_produces_no_output + property_of { + Webhook.new(REDIS).generate + }.check { |metadata, example| + result = invoke_webhook(example, extra_env: { "REQUEST_METHOD" => "GET" }) + assert_equal [200, {}, "OK"], result + assert_empty written + } + end + em :test_request_with_non_post_method_produces_no_output end