Merge pull request #2558 from basecamp/correct-card-url-in-webhook-payload

Correct card URL in comment JSON output
This commit is contained in:
Kevin McConnell
2026-02-17 17:20:02 +00:00
committed by GitHub
2 changed files with 6 additions and 6 deletions
@@ -13,9 +13,9 @@ json.cache! comment do
json.card do
json.id comment.card_id
json.url card_url(comment.card_id)
json.url card_url(comment.card)
end
json.reactions_url card_comment_reactions_url(comment.card_id, comment.id)
json.url card_comment_url(comment.card_id, comment.id)
json.reactions_url card_comment_reactions_url(comment.card, comment)
json.url card_comment_url(comment.card, comment)
end
@@ -78,9 +78,9 @@ class Cards::CommentsControllerTest < ActionDispatch::IntegrationTest
assert_response :success
assert_equal comment.id, @response.parsed_body["id"]
assert_equal comment.card.id, @response.parsed_body.dig("card", "id")
assert_equal card_url(comment.card.id), @response.parsed_body.dig("card", "url")
assert_equal card_comment_reactions_url(comment.card_id, comment.id), @response.parsed_body["reactions_url"]
assert_equal card_comment_url(comment.card_id, comment.id), @response.parsed_body["url"]
assert_equal card_url(comment.card), @response.parsed_body.dig("card", "url")
assert_equal card_comment_reactions_url(comment.card, comment), @response.parsed_body["reactions_url"]
assert_equal card_comment_url(comment.card, comment), @response.parsed_body["url"]
end
test "update as JSON" do