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

Add crm_v2 to DatabaseHelper clean() method #337

Merged
merged 4 commits into from
Aug 4, 2023

Conversation

Cruikshanks
Copy link
Member

When we added the first crm_v2 schema models to our repo we forgot to add the schema to our DatabaseHelper and its clean() method.

We use this to ensure the DB is empty of existing data before each test to ensure test isolation. This change adds the schema to the helper.

Note - we also had to tweak the query to wrap the schema name in quotes. It's because PostgreSQL doesn't actually like the name because it is case-sensitive 🤦😩. Without the quotes, everything falls over.

When we added the first `crm_v2` schema models to our repo we forgot to added the schema to our `DatabaseHelper` and its `clean()` method.

We use this to ensure the DB is empty of existing data before each test to ensure test isolation. This change adds the schema to the helper.

Note - we also had to tweak the query to wrap the schema name in quotes. It's because PostgreSQL doesn't actually like the name because it is case sensitive 🤦😩. Without the quotes everything falls over.
@Cruikshanks Cruikshanks added the housekeeping Refactoring, tidying up or other work which supports the project label Aug 3, 2023
@Cruikshanks Cruikshanks self-assigned this Aug 3, 2023
@Cruikshanks Cruikshanks marked this pull request as ready for review August 4, 2023 07:42
Jozzey
Jozzey previously approved these changes Aug 4, 2023
Copy link
Contributor

@StuAA78 StuAA78 left a comment

Choose a reason for hiding this comment

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

One small tweak to reflect our current standards while we're changing this file!

test/support/helpers/database.helper.js Outdated Show resolved Hide resolved
Co-authored-by: Stuart Adair <[email protected]>
@Cruikshanks Cruikshanks merged commit 489fd86 into main Aug 4, 2023
@Cruikshanks Cruikshanks deleted the add-crm-v2-to-database-helper branch August 4, 2023 15:06
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.

3 participants