Skip to content

how to test? #12

@PavelPolyakov

Description

@PavelPolyakov

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions