We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
(추후 작성 예정)
The text was updated successfully, but these errors were encountered:
@Nested class 공연_생성 { final String uri = "/admin/api/v1/stages"; @Nested @DisplayName("POST " + uri) class 올바른_주소로 { @Test @WithMockAuth(role = Role.ADMIN) void 요청을_보내면_201_응답과_Location_헤더에_식별자가_반환된다() throws Exception { // given given(stageCommandFacadeService.createStage(any(StageCreateCommand.class))) .willReturn(1L); // when & then mockMvc.perform(post(uri, 1) .cookie(TOKEN_COOKIE) .content(objectMapper.writeValueAsString(request)) .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isCreated()) .andExpect(header().string(HttpHeaders.LOCATION, "/admin/api/v1/stages/1")); } @Test void 토큰_없이_보내면_401_응답이_반환된다() throws Exception { // when & then mockMvc.perform(post(uri, 1)) .andExpect(status().isUnauthorized()); } @Test @WithMockAuth(role = Role.MEMBER) void 토큰의_권한이_Admin이_아니면_404_응답이_반환된다() throws Exception { // when & then mockMvc.perform(post(uri, 1) .cookie(TOKEN_COOKIE)) .andExpect(status().isNotFound()); } } }
Sorry, something went wrong.
No branches or pull requests
✨ 세부 내용
(추후 작성 예정)
The text was updated successfully, but these errors were encountered: