Fix production Basecamp webhook format

This commit is contained in:
Stanko K.R.
2025-10-01 14:36:45 +02:00
parent da9dcc7e31
commit 9ddfe4d803
3 changed files with 7 additions and 5 deletions
+3 -3
View File
@@ -126,9 +126,9 @@ class Webhook::DeliveryTest < ActiveSupport::TestCase
request_stub = stub_request(:post, webhook.url)
.with do |request|
body = JSON.parse(request.body)
body.key?("line") && body["line"].key?("content") && body["line"]["content"].present? &&
request.headers["Content-Type"] == "application/json"
body = CGI.parse(request.body)
body.key?("content") && body["content"].first.present? &&
request.headers["Content-Type"] == "application/x-www-form-urlencoded"
end
.to_return(status: 200)