Skip to content

Commit

Permalink
test : 닉네임 조건 검사 테스트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
rladmstn committed Jan 18, 2025
1 parent ebbc95c commit 6b3ab9a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,15 +357,15 @@ void checkNickname_1() {
}

@ParameterizedTest
@ValueSource(strings = {"***asdf", "16글자가초과된nickname입니다", "ab"})
@ValueSource(strings = {"***asdf", "16asdfasdfnicknameasdf", "ab"})
@DisplayName("닉네임 중복 검사 : 잘못된 형식의 닉네임")
void checkNickname_2(String invalidNickname) {
// given
// when, then
assertThatThrownBy(() -> userService.checkNickname(invalidNickname))
.isInstanceOf(CheckNicknameValidationException.class)
.hasFieldOrPropertyWithValue("code", HttpStatus.BAD_REQUEST.value())
.hasFieldOrPropertyWithValue("error", "닉네임은 3글자 이상, 16글자 이하이며 특수문자 불가입니다.");
.hasFieldOrPropertyWithValue("error", "닉네임은 영문과 숫자로 구성된 3~16글자여야 합니다.");
}

@Test
Expand Down

0 comments on commit 6b3ab9a

Please sign in to comment.