Skip to content

Add integration tests for JSON literal request bodies - #1728

Merged
iMacTia merged 2 commits into
mainfrom
imactia-json-literal-body-tests
Oct 25, 2026
Merged

iMacTia merged 2 commits into
mainfrom
imactia-json-literal-body-tests

Conversation

@iMacTia

@iMacTia iMacTia commented Oct 25, 2026

Copy link
Copy Markdown
Member

Description

Adds integration tests checking that JSON literals (false, true, integers, floats, 0, arrays, hashes) are correctly encoded as request bodies through the :json request middleware, plus a pre-encoded JSON string literal and a nil body (no body sent).

These validate the change in #1691 (preserving false request bodies in Connection#run_request). Without that fix, the false example fails; the rest pass.

Plain String bodies are left untouched by the JSON middleware (assumed already encoded), so strings are tested as pre-encoded JSON ('"hello"').

Todos

  • Tests
  • Documentation (N/A)

Additional Notes

Run with bin/integration-tests spec/integration/json_body_integration_spec.rb.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@iMacTia iMacTia self-assigned this Oct 25, 2026
@iMacTia
iMacTia merged commit d494fce into main Oct 25, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant