Skip to content

dipeshdulal/gin-testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gin Framework Integration Test

Experiment for testing gin framework request and responses. For testing we require gin router, test request and test response recorder so that test cases can be tested against.

Example:

req := httptest.NewRequest("GET", "/health-check", nil)
w := httptest.NewRecorder()
getRouter().ServeHTTP(w, req)
assert.Equal(t, http.StatusOK, response.Code, "status response is not same")

About

Example for Gin Framework Testing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages