From e95e2f4cc40f15f1bd1fd2fbbd61c369e65b2f84 Mon Sep 17 00:00:00 2001 From: insanity Date: Wed, 9 Aug 2017 19:25:02 +0900 Subject: [PATCH] init member password --- src/main/resources/init.sql | 4 ++-- .../module/member/service/MemberServiceTest.java | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main/resources/init.sql b/src/main/resources/init.sql index bd6a4ff..79af34b 100644 --- a/src/main/resources/init.sql +++ b/src/main/resources/init.sql @@ -380,10 +380,10 @@ INSERT INTO public.meta_vendor_crawler (id,create_date,crawler_id,vendor_id) VAL INSERT INTO public."member" (company_name,create_date,email,"name",phone,pw,status_id) VALUES ( -'loafle','2017-06-26 11:07:27.625','overflow@loafle.com','overFlow','000-000-0000','qwer5795',2); +'loafle','2017-06-26 11:07:27.625','overflow@loafle.com','overFlow','000-000-0000','$2a$10$G2bbjoX9.fOnxJx/8DZqPujFYrEQtIEB.f98/8K20XiGWEhwPakZ.',2); INSERT INTO public."member" (company_name,create_date,email,"name",phone,pw,status_id) VALUES ( -'loafle','2017-06-26 11:07:27.625','geek@loafle.com','geek','000-000-0000','qwer5795',1); +'loafle','2017-06-26 11:07:27.625','geek@loafle.com','geek','000-000-0000','$2a$10$G2bbjoX9.fOnxJx/8DZqPujFYrEQtIEB.f98/8K20XiGWEhwPakZ.',1); INSERT INTO public.email_auth (auth_confirm_date,create_date,email_auth_key,member_id) VALUES ( NULL,'2017-06-26 15:28:48.895','dbseogns1234',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 34d33f5..f8e88e3 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 @@ -17,7 +17,7 @@ import java.util.Date; /** * Created by insanity on 17. 6. 28. */ -@Ignore +//@Ignore @RunWith(SpringJUnit4ClassRunner.class) @ActiveProfiles("test") @ContextConfiguration(classes = {AppConfigTest.class}) @@ -29,17 +29,23 @@ public class MemberServiceTest { @Test public void regist() throws Exception { Member m = new Member(); - m.setPw("rawPassword"); + m.setPw("!@#$qwer1234"); m.setStatus(new MetaMemberStatus((short)1)); m.setCreateDate(new Date()); m.setCompanyName("Loafle"); - m.setEmail("of@loafle.com"); - m.setName("oF"); + m.setEmail("admin@loafle.com"); + m.setName("administrator"); m.setPhone("00000000"); Member res = this.memberService.signup(m); Assert.assertNotNull(res); } + @Test + public void signin() throws Exception { + Member m = this.memberService.signin("overflow@loafle.com", "!@#$qwer1234"); + Assert.assertNotNull(m); + } + }