-
Notifications
You must be signed in to change notification settings - Fork 6
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
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
97254ff
refactor: Post 관련 테스트 메소드 네이밍 수정
jjuny0310 fa42916
fix: boardFixture 메소드로 가져오도록 수정 및 usedBoard 필드 추가
jjuny0310 1de5dcc
fix: 게시판 조회 쿼리문 수정
jjuny0310 bb88f3f
refactor: 엔티티 생성하는 메소드 내부로 분리
jjuny0310 f2c886e
test: 정상적인 boardId, MemberId가 주어졌다면 게시글 쓰기가 성공하는 테스트 코드 작성
jjuny0310 04dcf06
test: 정상적인 boardId, MemberId가 주어졌다면 게시글 쓰기가 성공합니다.(이미지 O)
jjuny0310 9321544
test: 유효하지 않은 boardID가 주어졌다면 게시글 쓰기에 예외를 발생하는 테스트 코드 구현
jjuny0310 118a094
test: 유효하지 않은 memberId가 주어졌다면 게시글 쓰기에 예외를 발생하는 테스트 코드 구현
jjuny0310 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
src/main/java/com/ssafy/ssafsound/domain/board/repository/BoardRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
package com.ssafy.ssafsound.domain.board.repository; | ||
|
||
import java.util.List; | ||
|
||
import com.ssafy.ssafsound.domain.board.domain.Board; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface BoardRepository extends JpaRepository<Board, Long> { | ||
List<Board> findAllByUsedBoardTrue(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
제가 생각했을때는 True없이
메서드 네이밍이 여기까지만 와도 이해가 잘 되는 것 같아요
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.
좋은 의견 감사합니다.
메서드 네이밍 규칙에 True를 사용한 이유는 UsedBoard = True라는 조건을 걸어주기 위해서입니다!