Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove setting return cycle in ReturnLogHelper
When attempting to run the acceptance tests we found most of them were now failing. After investigating we tracked it down to a [recent change made](#1353) to the `ReturnLogHelper`. We started setting `returnCycleId` to a generated UUID. Normally, return logs have this set to the return cycle they fall within. However, if it is set (in the DB proper) the ID _must_ exist in `return.return_cycles`. We've opted not to replicate foreign key constraints in our test DB legacy migrations because of the additional complexity they would add to our unit tests, for something we don't need to cover in them. It wasn't being set before, because our premise for the helpers is they set _only_ what is required in order to insert a record. Any fields that are 'optional', are expected to be set within the test using the helper and passed in. Fortunately, removing the call in the helper hasn't broken any existing tests, further highlighting we don't really need this defaulted for what we are testing. And removing the call gets the acceptance tests passing again!
- Loading branch information