Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make test helpers consistent #198

Merged
merged 7 commits into from
Apr 26, 2023
Merged

Make test helpers consistent #198

merged 7 commits into from
Apr 26, 2023

Conversation

Jozzey
Copy link
Contributor

@Jozzey Jozzey commented Apr 25, 2023

To support our unit testing we have a convention of creating ‘helpers’ that create the data we need to test our code.

Often data is related, for example, a ChargeVersion is linked to a Licence record. When we first built the helpers we copied the model used by sroc-charging-module-api, which will create linked data records automatically.

But as time went on, we realised the complexity of the WRLS data schema was making this pattern unworkable so we stopped. But our initial data helpers still follow that pattern. This has caused us to waste time or get confused at times when working on SROC supplementary billing.

So, before we start the next phase of work, we need to update the original helpers to stop creating linked records and update existing tests accordingly.

@Jozzey Jozzey added the housekeeping Refactoring, tidying up or other work which supports the project label Apr 25, 2023
@Jozzey Jozzey self-assigned this Apr 25, 2023
@Jozzey Jozzey marked this pull request as ready for review April 25, 2023 13:13
@Jozzey Jozzey merged commit c9d1056 into main Apr 26, 2023
@Jozzey Jozzey deleted the standardise-test-helpers branch April 26, 2023 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Refactoring, tidying up or other work which supports the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants