Change summary
test/property/test_webhook_handler.rb | 11 +++++++++++
1 file changed, 11 insertions(+)
Detailed changes
@@ -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