aboutsummaryrefslogtreecommitdiff
path: root/server_test.go
diff options
context:
space:
mode:
authorGravatar Oleksandr Redko <Oleksandr_Redko@epam.com> 2023-04-28 18:39:58 +0300
committerGravatar GitHub <noreply@github.com> 2023-04-28 17:39:58 +0200
commit1dcf56222d6253715f3d637a7506d2c31981b5c8 (patch)
treee3acab7c9053a76519de5321c3407162f499dfa5 /server_test.go
parentexamples/client: fix error (#1545) (diff)
downloadfasthttp-1dcf56222d6253715f3d637a7506d2c31981b5c8.tar.gz
fasthttp-1dcf56222d6253715f3d637a7506d2c31981b5c8.tar.bz2
fasthttp-1dcf56222d6253715f3d637a7506d2c31981b5c8.zip
test: refactor to use WriteString (#1546)v1.47.0
Diffstat (limited to 'server_test.go')
-rw-r--r--server_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/server_test.go b/server_test.go
index 5400460..86d4c7d 100644
--- a/server_test.go
+++ b/server_test.go
@@ -1942,7 +1942,7 @@ func TestCompressHandler(t *testing.T) {
expectedBody := string(createFixedBody(2e4))
h := CompressHandler(func(ctx *RequestCtx) {
- ctx.Write([]byte(expectedBody)) //nolint:errcheck
+ ctx.WriteString(expectedBody) //nolint:errcheck
})
var ctx RequestCtx
@@ -2610,7 +2610,7 @@ func TestRequestCtxNoHijackNoResponse(t *testing.T) {
s := &Server{
Handler: func(ctx *RequestCtx) {
- io.WriteString(ctx, "test") //nolint:errcheck
+ ctx.WriteString("test") //nolint:errcheck
ctx.HijackSetNoResponse(true)
},
}