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: 게시글 쓰기 단위 테스트 코드 구현 #263

Merged
merged 8 commits into from
Oct 19, 2023

Conversation

jjuny0310
Copy link
Member

Issues

구분

  • 버그 수정
  • 기능 추가
  • 코드 리팩터링
  • 문서 업데이트
  • 기타

주요 변경점

  • 게시글 쓰기 단위 테스트 코드 구현
  • 게시판 조회 쿼리문 수정(usedBoard가 false면 조회되지 않도록)

스크린샷

기타

@jjuny0310 jjuny0310 added fix 버그 수정 test 테스트 labels Oct 18, 2023
@jjuny0310 jjuny0310 self-assigned this Oct 18, 2023
@jjuny0310 jjuny0310 force-pushed the test/write-post-#169 branch from 1648f8e to 118a094 Compare October 18, 2023 10:49
Copy link
Collaborator

@YongsHub YongsHub left a comment

Choose a reason for hiding this comment

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

의견 하나 남겼습니다!

@@ -18,7 +18,7 @@ public class BoardService {

@Transactional(readOnly = true)
public GetBoardResDto findBoards() {
List<Board> boards = boardRepository.findAll();
List<Board> boards = boardRepository.findAllByUsedBoardTrue();
Copy link
Collaborator

Choose a reason for hiding this comment

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

제가 생각했을때는 True없이

boardRepository.findAllByUsedBoard();

메서드 네이밍이 여기까지만 와도 이해가 잘 되는 것 같아요

Copy link
Member Author

Choose a reason for hiding this comment

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

좋은 의견 감사합니다.
메서드 네이밍 규칙에 True를 사용한 이유는 UsedBoard = True라는 조건을 걸어주기 위해서입니다!

@jjuny0310 jjuny0310 merged commit 3342317 into SSAF-SOUND:dev Oct 19, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix 버그 수정 test 테스트
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants