Closed Ali-Farhadnia closed 1 month ago
I should have used my test util functions for that. I see that now. I think it's better to be testing against random data.
Do you mean that util functions must used for seeding the user too?
I updated the code. All tests are using the core seed data functions. We don't want to hard code anything in the tests. If you have a special need for a DB record to look a certain way, you have the ability to do that. But I would use these Test functions as a first choice.
MIssing something
thanks bill
Look at it now. I think this is better. GREAT CATCH, I missed this :(
Thanks bill.Yes i think that is better now :)
I've made some changes to test functions in business layer for better readability. Here's why:
Consistency: I've used the same method for seeding data in all tests, which makes them easier to follow and maintain.
Clearer Tests: Putting the test data front improves readability. It's easier to understand what each test is checking.