Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upDocumentation: How to do unit testing #1549
Comments
sporto
changed the title from
Documentation: How to do unit test
to
Documentation: How to do unit testing
Feb 8, 2018
This comment has been minimized.
rajcspsg
commented
Mar 11, 2018
|
Hi - Can I work on this documentation issue and submit PR? |
This comment has been minimized.
|
Sure. |
This comment has been minimized.
joelgallant
commented
Oct 1, 2018
|
@rajcspsg did you end up creating anything for this? |
This comment has been minimized.
|
@joelgallant Try looking into diesels own test suit for examples how to write unit tests. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sporto commentedFeb 8, 2018
•
edited
What are you trying to accomplish?
I'm building a web server using Diesel. I want to unit test my code that access the DB via diesel. But I'm finding it unclear how to do this.
What is the expected output?
A documentation guide that explain best practices for unit testing while using Diesel and how to.
For example if I choose to hit the DB, how to clean it before each test, or run tests in transactions. Maybe something about factories.
If I would like to mock db call, how to achieve this.