mirror of
https://github.com/labstack/echo.git
synced 2025-02-03 13:11:39 +02:00
Fixed body-limit middleware test
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
2aec0353f5
commit
1f1b211328
@ -12,7 +12,6 @@ import (
|
||||
)
|
||||
|
||||
func TestBodyLimit(t *testing.T) {
|
||||
return
|
||||
e := echo.New()
|
||||
hw := []byte("Hello, World!")
|
||||
req, _ := http.NewRequest(echo.POST, "/", bytes.NewReader(hw))
|
||||
@ -29,7 +28,7 @@ func TestBodyLimit(t *testing.T) {
|
||||
// Based on content length (within limit)
|
||||
if assert.NoError(t, BodyLimit("2M")(h)(c)) {
|
||||
assert.Equal(t, http.StatusOK, rec.Code)
|
||||
assert.Equal(t, hw, rec.Body.Bytes)
|
||||
assert.Equal(t, hw, rec.Body.Bytes())
|
||||
}
|
||||
|
||||
// Based on content read (overlimit)
|
||||
|
Loading…
x
Reference in New Issue
Block a user