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

test: rollback 호출하는지 확인하도록 수정 #29

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

Coalery
Copy link
Member

@Coalery Coalery commented Oct 20, 2023

주요 변경 사항

실제로 롤백되는 것을 확인하는 것이 아니라, AbstractConnection#rollback을 호출하는지를 확인합니다.

변경 이유

실제로 롤백되는지 확인하는 것까지 테스트하면, @Transactional 데코레이터를 테스트하는 것이 아니라 mikro-orm의 동작을 테스트하는 것이 됩니다.

이는 의도한 바가 아니기 때문에, rollback 메서드를 호출하는지만 확인하는 것으로 수정하였습니다.

@Coalery Coalery self-assigned this Oct 20, 2023
@github-actions
Copy link

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 83.69% 236/282
🔴 Branches 48% 24/50
🟡 Functions 62.16% 46/74
🟢 Lines 84.17% 218/259

Test suite run success

23 tests passing in 8 suites.

Report generated by 🧪jest coverage report action from 8b12c0b

@Coalery Coalery merged commit 81fc8ca into main Oct 20, 2023
@Coalery Coalery deleted the test/check-rollback-call branch October 20, 2023 17:22
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.

1 participant