Pass http.NoBody instead of nil as body

This commit is contained in:
TwiN
2021-11-11 00:14:00 -05:00
parent 05e9add16d
commit 17a431321c
8 changed files with 9 additions and 9 deletions

View File

@ -22,7 +22,7 @@ func TestFavIcon(t *testing.T) {
}
for _, scenario := range scenarios {
t.Run(scenario.Name, func(t *testing.T) {
request, _ := http.NewRequest("GET", scenario.Path, nil)
request, _ := http.NewRequest("GET", scenario.Path, http.NoBody)
responseRecorder := httptest.NewRecorder()
router.ServeHTTP(responseRecorder, request)
if responseRecorder.Code != scenario.ExpectedCode {