Skip to content
Myr

fix: test error (#3087)

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

authored by thinkerou · committed by GitHub · parent 417b142 · Browse files · 1 file+4 added−4 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+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:routes_test.go+4 added-4 removed
342 unmodified lines
343 router := New()344 router.Static("/using_static", dir)345 router.StaticFileFS("/result_fs", filename, Dir(dir, false))346347 w := performRequest(router, http.MethodGet, "/using_static/"+filename)348 w2 := performRequest(router, http.MethodGet, "/result_fs")347 w := PerformRequest(router, http.MethodGet, "/using_static/"+filename)348 w2 := PerformRequest(router, http.MethodGet, "/result_fs")349350 assert.Equal(t, w, w2)351 assert.Equal(t, http.StatusOK, w.Code)352 assert.Equal(t, "Gin Web Framework", w.Body.String())353 assert.Equal(t, "text/plain; charset=utf-8", w.Header().Get("Content-Type"))354355 w3 := performRequest(router, http.MethodHead, "/using_static/"+filename)356 w4 := performRequest(router, http.MethodHead, "/result_fs")355 w3 := PerformRequest(router, http.MethodHead, "/using_static/"+filename)356 w4 := PerformRequest(router, http.MethodHead, "/result_fs")357358 assert.Equal(t, w3, w4)359 assert.Equal(t, http.StatusOK, w3.Code)360}
313 unmodified lines