initial v0.8 pre-release

This commit is contained in:
Gani Georgiev committed 2022-10-30 10:28:14 +02:00
1 parent 9cbb2e750e
commit 90dba45d7c
388 files changed
+21574 -13597

No files matched your search

+3 -3
View File
@@ -75,14 +75,14 @@ func TestBindBody(t *testing.T) {
}
}
func TestReadJsonBodyCopy(t *testing.T) {
func TestCopyJsonBody(t *testing.T) {
req := httptest.NewRequest(http.MethodGet, "/", strings.NewReader(`{"test":"test123"}`))
// simulate multiple reads from the same request
result1 := map[string]string{}
rest.ReadJsonBodyCopy(req, &result1)
rest.CopyJsonBody(req, &result1)
result2 := map[string]string{}
rest.ReadJsonBodyCopy(req, &result2)
rest.CopyJsonBody(req, &result2)
if len(result1) == 0 {
t.Error("Expected result1 to be filled")