nimblehq / gin-templates

Our optimized Gin templates used in our projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update controller unit test to use Gin test context

gutakk opened this issue · comments

Why

Gin test context allows you to simply call the controller function without making the HTTP requests and allows you to mock the function that the controller calls inside its function. OmiseLabs team is also using this approach. For more information about this click.

This approach also allows you to make the HTTP request if you need to. You can check this out

Acceptance Criteria

Update existing controller unit test to use Gin test context.

Who Benefits?

Developers