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

Refactor supplementary test code #68

Merged
merged 4 commits into from
Dec 21, 2022
Merged

Conversation

Cruikshanks
Copy link
Member

@Cruikshanks Cruikshanks commented Dec 20, 2022

https://eaflood.atlassian.net/browse/WATER-3854

We are about to Update "create bill run" endpoint to create a bill run. Currently, everything is happening in the controller whereas our convention is to do everything in a service and keep our controllers 'skinny'.

So, we need a service, something like SupplementaryService. But oh no! It already exists.

This change is about refactoring the code currently in SupplementaryService to a more explicit testing version so we can free up the namespace. Whilst we're at it we also rename the /test path to check/ as everyone was getting confused by seeing test/ folders in various places in the code 😁

https://eaflood.atlassian.net/browse/WATER-3854

We are about to [Update "create bill run" endpoint to create a bill run](#56). Currently, everything is happening in the controller whereas our convention is to do everything in a service and keep our controllers ['skinny'](https://blog.makersacademy.com/forget-fat-models-its-time-for-skinny-controllers-and-skinny-models-a9b84ec481b7).

So, we need a service, something like `SupplementaryService`. But oh no! It already exists.

This change is about refactoring the code currently in `SupplementaryService` to a more explicit testing version so we can free up the namespace. While we're at it, we also rename our `/test` path to `/qa` because everyone is getting confused when they come across a `test/` folder in the repo!
@Cruikshanks Cruikshanks added the housekeeping Refactoring, tidying up or other work which supports the project label Dec 20, 2022
@Cruikshanks Cruikshanks self-assigned this Dec 20, 2022
@Cruikshanks Cruikshanks marked this pull request as ready for review December 20, 2022 11:14
@Cruikshanks Cruikshanks requested a review from Jozzey December 20, 2022 11:14
Copy link
Contributor

@Jozzey Jozzey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@Cruikshanks Cruikshanks merged commit dcf09a5 into main Dec 21, 2022
@Cruikshanks Cruikshanks deleted the refactor-supplementary-test-code branch December 21, 2022 13:31
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