mirror of
https://github.com/gin-gonic/gin.git
synced 2026-06-10 14:44:37 +08:00
fix: check error return value in test
This commit is contained in:
parent
5c0397dfff
commit
bcc32853c4
@ -1090,7 +1090,7 @@ func TestServeErrorWritten(t *testing.T) {
|
||||
router := New()
|
||||
router.Use(func(c *Context) {
|
||||
c.Writer.WriteHeader(http.StatusNotFound)
|
||||
c.Writer.Write([]byte("custom error"))
|
||||
_, _ = c.Writer.Write([]byte("custom error"))
|
||||
c.Next()
|
||||
})
|
||||
router.NoRoute(func(c *Context) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user