Closed ericnordelo closed 1 month ago
I added the tests for the internal methods that were missing, but not sure what's the best approach to test hooks, since the only implementation we provide is empty, and how can we test an empty behavior? If we were to test that functions don't do things that's infinite possibilities right? Any ideas?
not sure what's the best approach to test hooks, since the only implementation we provide is empty, and how can we test an empty behavior? If we were to test that functions don't do things that's infinite possibilities right? Any ideas?
We must test ALL possibilities!!!
No, there's no point in testing empty behaviors. What we can test is the side effects of the before and after hook with a mock to confirm they're called in the correct order i.e. before_update
is called before _update
. A Cairo mocking library would be super useful :(
Unless you have another idea, I say let's get this merged and regroup on this. WDYT?
Partially fixes #965
PR Checklist