Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 회원가입 버그 수정 #79

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,45 +127,6 @@ void yonseiGolfLoginTest() throws Exception {
));
}

@Test
@DisplayName("회원이 아니라면 회원가입을 할 수 있다.")
void signUpTest() throws Exception {
// given
MockHttpSession session = new MockHttpSession();
session.setAttribute("kakaoUser", 1L);
SignUpUserRequest request = SignUpUserRequest.builder()
.name("name")
.phoneNumber("phoneNumber")
.major("major")
.studentId(1)
.semester(10)
.build();
// when

// then
mockMvc.perform(post("/users/signUp")
.session(session)
.contentType(MediaType.APPLICATION_JSON)
.content(objectMapper.writeValueAsString(request)))
.andDo(print())
.andExpect(status().isOk())
.andDo(document("user-signUp-doc",
getDocumentRequest(),
getDocumentResponse(),
requestFields(
fieldWithPath("name").type(JsonFieldType.STRING)
.description("이름"),
fieldWithPath("phoneNumber").type(JsonFieldType.STRING)
.description("전화번호"),
fieldWithPath("major").type(JsonFieldType.STRING)
.description("전공"),
fieldWithPath("studentId").type(JsonFieldType.NUMBER)
.description("학번"),
fieldWithPath("semester").type(JsonFieldType.NUMBER)
.description("학기"))
));
}

@Test
@DisplayName("로그인된 상태라면 에러를 발생한다.")
void loggedInErrorTest() throws Exception {
Expand Down

This file was deleted.