-
Notifications
You must be signed in to change notification settings - Fork 73
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
fix: add integration tests for user domain #2322
base: main
Are you sure you want to change the base?
Conversation
@@ -19,6 +19,7 @@ export class Wallet implements z.infer<typeof WalletSchema> { | |||
|
|||
@ManyToOne(() => User, (user: User) => user.id, { | |||
onDelete: 'CASCADE', | |||
nullable: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This otherwise defaults to true
meaning that Wallet
s could be added without a User
.
@PooyaRaki, I'm having issues with the tests passing. I initially thought it was because I moved the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the test issue happened only to the PR and it seems to be a CI issue I'll approve the PR but the issue should be fixed before merging to main
.
Summary
We test the user (and wallet) domain via controller tests. This adds integration tests for the repositories of the aforementioned controller, covering database-relevant cases.
Changes
Wallet['user_id']
non-nullableUserRepository
WalletRepository