Closed Ali-Farhadnia closed 1 month ago
Everything gets check by virtual of running all the tests. Remember we seed the database and query. If there is no error on these create tests, I feel I can assume it's ok.
OK, but do we cover something like this(https://github.com/ardanlabs/service/commit/2750ba139db2100c5aba688a95eec8cdbf45ac0f) in the tests? Because this item was added to the tests before refactoring the tests.
I changed the test to follow the table table model. This also allowed me to write individual tests for the different activities. All that being said, it's not necessary wrong to add a query call to the CUD tests. The question is how important is it since we have an individual query test? I think one problem with tests (and I am guity) is a lot of duplication.
Thanks for clarifying, Bill.
In business tests. Why is the result stored in the database not checked and only the result returned by the core API is tested?
for example in user update test:
func userUpdate(dbt *dbtest.Test, sd dbtest.SeedData) []dbtest.UnitTable { email, _ := mail.ParseAddress("jack@ardanlabs.com")
}