Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to test? #12

Open
PavelPolyakov opened this issue Oct 22, 2017 · 0 comments
Open

how to test? #12

PavelPolyakov opened this issue Oct 22, 2017 · 0 comments

Comments

@PavelPolyakov
Copy link

Hello @shijuvar,

Thanks for the book and example of the complete go service.

One question remains. Can you, please, tell how to test handlers with the suggested structure?

Let's say I want to test CreateTask handler from this file:
https://github.com/shijuvar/go-web/blob/master/taskmanager/controllers/taskController.go

While I want to use mock of the mgo, I do not want to write/read from the real database.

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant