Skip to content

Commit

Permalink
Test: add find user
Browse files Browse the repository at this point in the history
  • Loading branch information
emost22 committed Jun 20, 2024
1 parent fd119da commit dac366d
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static org.assertj.core.api.Assertions.assertThat;

import com.sirius.spurt.common.config.QuerydslConfigTest;
import com.sirius.spurt.store.repository.database.entity.UserEntity;
import com.sirius.spurt.test.UserTest;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -29,4 +30,16 @@ class UserRepositoryTest implements UserTest {
// then
assertThat(isExistsUser).isEqualTo(true);
}

@Test
void 유저_조회_테스트() {
// given
UserEntity savedUser = userRepository.save(TEST_USER);

// when
UserEntity userEntity = userRepository.findByUserId(TEST_USER_ID);

// then
assertThat(userEntity).isEqualTo(savedUser);
}
}

0 comments on commit dac366d

Please sign in to comment.