elixir-plug / plug

Compose web applications with functions
https://hex.pm/packages/plug
Other
2.85k stars 586 forks source link

Add Plug.Adapters.Test.Conn tests #1235

Closed thymusvulgaris closed 3 months ago

thymusvulgaris commented 3 months ago
thymusvulgaris commented 3 months ago

I haven't included the following test.

+++ b/test/plug/adapters/test/conn_test.exs
@@ -7,6 +7,7 @@ defmodule Plug.Adapters.Test.ConnTest do
     conn = conn(:get, "/", "abcdefghij")
     {adapter, state} = conn.adapter

+    assert {:ok, "abcdefghij", _state} = adapter.read_req_body(state)

A binary larger than the default length would make for a better test, but that would be a very large binary.

josevalim commented 3 months ago

:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart: