Skip to content

Commit 616dff6

Browse files
Afonso Aguasclaude
andcommitted
Remove regression comments from new tests
Per PR review feedback. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent e707520 commit 616dff6

2 files changed

Lines changed: 0 additions & 9 deletions

File tree

test/whatsapp/api/client_test.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ def test_send_request_delete_with_success_response
5151
assert_nil(response_body)
5252
end
5353

54-
# Regression: a 200 response whose body text contains the substring "error" (e.g.
55-
# inside a WhatsApp template body) must not be treated as an error. Previously the
56-
# client passed the raw body String to `response_error?`, which delegated to
57-
# `String#[]` — a substring scan — and raised HttpResponseError for any body
58-
# containing the word "error".
5954
def test_send_request_does_not_raise_when_body_text_contains_error_substring
6055
payload = {
6156
'data' => [{

test/whatsapp/api/responses/generic_error_response_test.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ def test_response_error_returns_nil_for_hash_without_error_key
1919
assert_nil(GenericErrorResponse.response_error?(response: response))
2020
end
2121

22-
# Regression guard: a raw JSON string that happens to contain the substring "error"
23-
# (e.g. inside a template body) must NOT trigger an error. Previously String#[] was
24-
# used as a substring scan, causing false positives for any 200 response body
25-
# mentioning the word "error".
2622
def test_response_error_returns_false_for_string_input
2723
body = '{"data":[{"text":"si tu cupón te da algún error, avísanos"}]}'
2824
assert_equal(false, GenericErrorResponse.response_error?(response: body))

0 commit comments

Comments
 (0)