I just want to know if you test the output of a query with unit testing. Is this considered good practice?
For example you have a method getUsers()
getUsers(){
// Overly simplified
return select users from table_users
where create_date between "day_a" and "day_b" and active = true
or where create_date < "day_a" and active = false
}
It is a "complex" query and you want to make sure you get a certain output. Maybe you missed something, but not sure if you actually need to create a unit test. Maybe the query should be self explanatory...
I'm looking for opinions.