Skip to content

Commit 23259e6

Browse files
committed
fix: 쪽지 읽음처리 테스트 코드 수정
- noteId를 고정값이 아닌 생성된 쪽지의 id를 사용하도록 수정
1 parent 6efac0e commit 23259e6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/test/java/com/somemore/note/service/NoteMarkAsReadServiceTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,14 @@ class NoteMarkAsReadServiceTest extends IntegrationTestSupport {
2525
@Test
2626
void noteMarkAsRead() {
2727
// given
28-
Long noteId = 1L;
29-
3028
Note note = Note.create(UUID.randomUUID(), UUID.randomUUID(), "제목", "내용");
3129
noteRepository.save(note);
3230

3331
// when
34-
noteMarkAsReadService.noteMarkAsRead(noteId);
32+
noteMarkAsReadService.noteMarkAsRead(note.getId());
3533

3634
// then
37-
Note updatedNote = noteRepository.findById(noteId)
35+
Note updatedNote = noteRepository.findById(note.getId())
3836
.orElseThrow(() -> new NoSuchElementException(NOT_EXISTS_NOTE));
3937

4038
assertTrue(updatedNote.getIsRead(), "노트가 읽음 상태로 변경되어야 한다.");

0 commit comments

Comments
 (0)