mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-17 11:38:14 +02:00
initial v0.8 pre-release
This commit is contained in:
1 parent
9cbb2e750e
commit
90dba45d7c
388 files changed
+21574
-13597
No files matched your search
@@ -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")
|
||||
|
||||
Reference in new issue
Block a user