Skip to content

Commit

Permalink
test: 유저 상태변경 시 검증 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
smartandhandsome committed Nov 29, 2023
1 parent 4acbc0b commit 599a9a7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void assignUsersToChattingRoomTest() {
// given
Set<Long> userIds = Set.of(1L, 2L);
ChattingRoom chattingRoom = new ChattingRoom();
Set<User> users = Set.of(user(), user());
Set<User> users = Set.of(user(MATCHING), user(MATCHING));
given(userQuery.getUsersByIdSet(userIds)).willReturn(users);

// when
Expand Down Expand Up @@ -147,7 +147,7 @@ void unsubscribeNotification() {
@DisplayName("유저 상태를 채팅방 연결로 변경할 수 있다.")
void enterToChattingRoomTest() {
// given
User user = user();
User user = user(CHATTING_UNCONNECTED);

given(userQuery.getUserById(user.getId())).willReturn(user);

Expand All @@ -162,7 +162,7 @@ void enterToChattingRoomTest() {
@DisplayName("유저 상태를 채팅방 연결 해제로 변경할 수 있다.")
void exitChattingRoomTest() {
// given
User user = user();
User user = user(CHATTING_CONNECTED);

given(userQuery.getUserById(user.getId())).willReturn(user);

Expand Down Expand Up @@ -193,7 +193,7 @@ void setToIdleTest() {
@DisplayName("유저 상태를 매칭 중으로 변경할 수 있다.")
void setToMatchingTest() {
// given
User user = user();
User user = user(IDLE);

given(userQuery.getUserById(user.getId())).willReturn(user);

Expand Down

0 comments on commit 599a9a7

Please sign in to comment.