FAQ
Does anyone have experience testing gin gonic routes? It seems pretty
complicated to create a mock context and am trying to figure out how.
Thanks!

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Kiki Sugiaman at Jul 1, 2015 at 1:53 am
    The same way you test any other (say, net/http) routes. Only this time
    with gin specific router and handler.

    http://play.golang.org/p/qyhD0mlCST

    (I'd say that testing routes is not a good unit testing practice in that
    they're not "unit" enough, most of the time, unless you want to roll-out
    an integration test, but that's not your question)

    On 01/07/15 08:45, Dan Judd wrote:
    Does anyone have experience testing gin gonic routes? It seems pretty
    complicated to create a mock context and am trying to figure out how.
    Thanks!
    --
    You received this message because you are subscribed to the Google
    Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to golang-nuts+unsubscribe@googlegroups.com
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJun 30, '15 at 10:45p
activeJul 1, '15 at 1:53a
posts2
users2
websitegolang.org

2 users in discussion

Dan Judd: 1 post Kiki Sugiaman: 1 post

People

Translate

site design / logo © 2022 Grokbase