mirror of
https://github.com/gin-gonic/gin.git
synced 2026-06-10 06:28:24 +08:00
fix: check error return value in test
This commit is contained in:
parent
41a288341f
commit
efbf0aefa4
@ -1122,7 +1122,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