Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://eaflood.atlassian.net/browse/WATER-4523
While migrating the fixture files for the acceptance tests, it was noticed that the return-log helper defaults the return-log as being status 'completed' and therefore it has a 'receivedDate'.
Our acceptance tests use these helpers to load the data from our fixture file.
We have instances of tests breaking because of the return-log helper. The tests set up the data in a fixtures file that is sent to the
load.service
endpoint as a request payload. Hapi when passing a payload will strip out any null values. For these failing tests the 'recievedDate' needs to be null. When hapi removes the null values, the data passed to the helper will have no 'recievedDate' property, meaning the helper will then use the default data, which populated the date.This change is to default the return-log helper as a due return rather than a completed return, removing the default data in 'recievedDate' and changing the status to 'due' so the data is more real.
This solves our acceptance test issue, without breaking any unit tests either.