Skip to content
Myr

Improve serveError code coverage (#980)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Eason Lin · committed by Bo-Yi Wu · parent b985857 · Browse files · 1 file+12 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+12 added−0 removed

  • other:+12 added−0 removed

1 file+12 added−0 removed

modified:routes_test.go+12 added
437 unmodified lines
438439 w := performRequest(route, "POST", "/project/Some%2FOther%2FProject/build/333")440 assert.Equal(t, w.Code, 200)441}442443func TestRouteServeErrorWithWriteHeader(t *testing.T) {444 route := New()445 route.Use(func(c *Context) {446 c.Status(421)447 c.Next()448 })449450 w := performRequest(route, "GET", "/NotFound")451 assert.Equal(t, 421, w.Code)452 assert.Equal(t, 0, w.Body.Len())453}