summaryrefslogtreecommitdiffstats
path: root/modules/lfs/http_client_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/lfs/http_client_test.go')
-rw-r--r--modules/lfs/http_client_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/lfs/http_client_test.go b/modules/lfs/http_client_test.go
index 0f633ede54..589773e45b 100644
--- a/modules/lfs/http_client_test.go
+++ b/modules/lfs/http_client_test.go
@@ -13,7 +13,8 @@ import (
"strings"
"testing"
- jsoniter "github.com/json-iterator/go"
+ "code.gitea.io/gitea/modules/json"
+
"github.com/stretchr/testify/assert"
)
@@ -146,7 +147,7 @@ func lfsTestRoundtripHandler(req *http.Request) *http.Response {
}
payload := new(bytes.Buffer)
- jsoniter.NewEncoder(payload).Encode(batchResponse)
+ json.NewEncoder(payload).Encode(batchResponse)
return &http.Response{StatusCode: http.StatusOK, Body: ioutil.NopCloser(payload)}
}
@@ -160,7 +161,7 @@ func TestHTTPClientDownload(t *testing.T) {
assert.Equal(t, MediaType, req.Header.Get("Accept"))
var batchRequest BatchRequest
- err := jsoniter.NewDecoder(req.Body).Decode(&batchRequest)
+ err := json.NewDecoder(req.Body).Decode(&batchRequest)
assert.NoError(t, err)
assert.Equal(t, "download", batchRequest.Operation)
@@ -267,7 +268,7 @@ func TestHTTPClientUpload(t *testing.T) {
assert.Equal(t, MediaType, req.Header.Get("Accept"))
var batchRequest BatchRequest
- err := jsoniter.NewDecoder(req.Body).Decode(&batchRequest)
+ err := json.NewDecoder(req.Body).Decode(&batchRequest)
assert.NoError(t, err)
assert.Equal(t, "upload", batchRequest.Operation)