From 6767112c53eb6e90493250a3cfe51129d02092b1 Mon Sep 17 00:00:00 2001 From: geek Date: Thu, 24 Aug 2017 15:05:25 +0900 Subject: [PATCH] signup parameter modify --- .../loafle/overflow/module/member/service/MemberService.java | 4 ++-- .../overflow/module/member/service/MemberServiceTest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/loafle/overflow/module/member/service/MemberService.java b/src/main/java/com/loafle/overflow/module/member/service/MemberService.java index fa7ab4d..8422891 100644 --- a/src/main/java/com/loafle/overflow/module/member/service/MemberService.java +++ b/src/main/java/com/loafle/overflow/module/member/service/MemberService.java @@ -41,7 +41,7 @@ public class MemberService { return m; } - public Member signup(Member member) { + public Member signup(Member member, String pw) { Member isMember = this.memberDAO.findByEmail(member.getEmail()); @@ -50,7 +50,7 @@ public class MemberService { } BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(); - member.setPw(passwordEncoder.encode(member.getPw())); + member.setPw(passwordEncoder.encode(pw)); if (member.getStatus() == null) { member.setStatus(new MetaMemberStatus((short) 1)); diff --git a/src/test/java/com/loafle/overflow/module/member/service/MemberServiceTest.java b/src/test/java/com/loafle/overflow/module/member/service/MemberServiceTest.java index f8e88e3..649b296 100644 --- a/src/test/java/com/loafle/overflow/module/member/service/MemberServiceTest.java +++ b/src/test/java/com/loafle/overflow/module/member/service/MemberServiceTest.java @@ -37,7 +37,7 @@ public class MemberServiceTest { m.setName("administrator"); m.setPhone("00000000"); - Member res = this.memberService.signup(m); + Member res = this.memberService.signup(m,"!@#$qwer1234"); Assert.assertNotNull(res); }