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 missing test cleanup #4289

Merged
merged 2 commits into from Dec 19, 2023
Merged

Add missing test cleanup #4289

merged 2 commits into from Dec 19, 2023

Conversation

Nutomic
Copy link
Member

@Nutomic Nutomic commented Dec 18, 2023

Followup for #4275. This test failure showed the extra usernames.

Person::delete(pool, timmy.id).await.unwrap();
Person::delete(pool, sara.id).await.unwrap();
Person::delete(pool, jess.id).await.unwrap();
Instance::delete(pool, instance.id).await.unwrap();
Copy link
Member Author

Choose a reason for hiding this comment

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

Due to on delete cascade it would be enough to call only Instance::delete here, right?

Copy link
Member

Choose a reason for hiding this comment

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

Yep, that should work fine.

Person::delete(pool, timmy.id).await.unwrap();
Person::delete(pool, sara.id).await.unwrap();
Person::delete(pool, jess.id).await.unwrap();
Instance::delete(pool, instance.id).await.unwrap();
Copy link
Member

Choose a reason for hiding this comment

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

Yep, that should work fine.

Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

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

Feel free to merge after running fmt

@Nutomic Nutomic enabled auto-merge (squash) December 19, 2023 09:55
@Nutomic Nutomic merged commit a507a39 into main Dec 19, 2023
1 of 2 checks passed
sunaurus pushed a commit to sunaurus/lemmy that referenced this pull request Jan 1, 2024
* Add missing test cleanup

* cleanup
sunaurus pushed a commit to sunaurus/lemmy that referenced this pull request Jan 1, 2024
* Add missing test cleanup

* cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants