Skip to content

Commit

Permalink
test: Fixture 수정, User 상태 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
smartandhandsome committed Nov 30, 2023
1 parent 3978653 commit da370d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package coffeemeet.server.chatting.concurrency;

import static coffeemeet.server.user.domain.UserStatus.CHATTING_UNCONNECTED;
import static coffeemeet.server.user.domain.UserStatus.MATCHING;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.BDDMockito.willDoNothing;

Expand Down Expand Up @@ -57,7 +59,7 @@ void tearDown() {
void chattingConcurrencyTest() throws InterruptedException {
// given
ChattingRoom room = chattingRoomRepository.save(ChattingFixture.chattingRoom());
User user = userRepository.save(UserFixture.user());
User user = userRepository.save(UserFixture.user(CHATTING_UNCONNECTED));

String sessionId = "sessionId";
chattingMessageService.storeSocketSession(sessionId, String.valueOf(user.getId()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public static User user(UserStatus userStatus) {
.set(field(User::getUserStatus), userStatus)
.ignore(field(User::isDeleted))
.ignore(field(User::isBlacklisted))
.ignore(field(User::getChattingRoom))
.create();
}

Expand Down

0 comments on commit da370d0

Please sign in to comment.