Skip to content

Commit

Permalink
fix: 채팅 메시지 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
23Yong committed Oct 6, 2023
1 parent 01415e3 commit d44943d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
public class RedisConfig {

private static final String REDISSON_HOST_PREFIX = "redis://";

private final RedisProperties redisProperties;

@Bean
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package kr.codesquad.secondhand.application.chat;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertAll;

import java.util.List;
import kr.codesquad.secondhand.application.ApplicationTestSupport;
import kr.codesquad.secondhand.domain.chat.ChatLog;
import kr.codesquad.secondhand.domain.chat.ChatRoom;
Expand All @@ -15,6 +11,11 @@
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertAll;

@DisplayName("비즈니스 로직 - 채팅 메시지")
class ChatLogServiceTest extends ApplicationTestSupport {

Expand Down Expand Up @@ -51,7 +52,7 @@ void givenChatRoomIdAndMessageIndex_whenGetMessages_thenSuccess() {
() -> assertThat(response.getChat()).hasSize(10),
() -> assertThat(response.getChatPartnerName()).isEqualTo("joy"),
() -> assertThat(response.getItem().getTitle()).isEqualTo("선풍기"),
() -> assertThat(chatLogs.get(9).getReadCount()).isEqualTo(0)
() -> assertThat(chatLogs.get(9).getReadCount()).isEqualTo(1)
);
}

Expand Down

0 comments on commit d44943d

Please sign in to comment.