Modified the unit test

This commit is contained in:
kimyonghwa
2019-05-10 10:27:03 +09:00
parent 189e741ded
commit 69f3053371
3 changed files with 15 additions and 16 deletions

View File

@@ -51,12 +51,12 @@ public class UserController {
@ApiOperation(value = "회원 수정", notes = "회원정보를 수정한다")
@PutMapping(value = "/user")
public SingleResult<User> modify(
@ApiParam(value = "회원번호", required = true) @RequestParam long msrl,
@ApiParam(value = "회원이름", required = true) @RequestParam String name) {
User user = User.builder()
.msrl(msrl)
.name(name)
.build();
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
String id = authentication.getName();
User user = userJpaRepo.findByUid(id).orElseThrow(CUserNotFoundException::new);
user.setName(name);
return responseService.getSingleResult(userJpaRepo.save(user));
}