These are chat archives for gin-gonic/gin

31st
Mar 2016
Bo-Yi Wu
@appleboy
Mar 31 2016 08:25
Hi all I write api testing tool. Everyone can test your api using gin framework. Try: https://github.com/appleboy/mocha
Andrey Nering
@andreynering
Mar 31 2016 11:22

@appleboy Seems nice! I use a helper like this:

func newTestContext(method, path) (w *httptest.ResponseRecorder, r *http.Request) {
    w = httptest.NewRecorder()
    r, _ = http.NewRequest(method, path, nil)
    r.PostForm = url.Values{}
    return
}

+ ServeHTTP(w, r). Works well.

Bo-Yi Wu
@appleboy
Mar 31 2016 15:08
I change the repo name from mocha to gofight https://github.com/appleboy/gofight
Thomas Boerger
@tboerger
Mar 31 2016 15:23
Interesting