init member password

This commit is contained in:
insanity 2017-08-09 19:25:02 +09:00
parent a22c8c432a
commit e95e2f4cc4
2 changed files with 12 additions and 6 deletions

View File

@ -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 ( 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 ( 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 ( 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); NULL,'2017-06-26 15:28:48.895','dbseogns1234',1);

View File

@ -17,7 +17,7 @@ import java.util.Date;
/** /**
* Created by insanity on 17. 6. 28. * Created by insanity on 17. 6. 28.
*/ */
@Ignore //@Ignore
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@ActiveProfiles("test") @ActiveProfiles("test")
@ContextConfiguration(classes = {AppConfigTest.class}) @ContextConfiguration(classes = {AppConfigTest.class})
@ -29,17 +29,23 @@ public class MemberServiceTest {
@Test @Test
public void regist() throws Exception { public void regist() throws Exception {
Member m = new Member(); Member m = new Member();
m.setPw("rawPassword"); m.setPw("!@#$qwer1234");
m.setStatus(new MetaMemberStatus((short)1)); m.setStatus(new MetaMemberStatus((short)1));
m.setCreateDate(new Date()); m.setCreateDate(new Date());
m.setCompanyName("Loafle"); m.setCompanyName("Loafle");
m.setEmail("of@loafle.com"); m.setEmail("admin@loafle.com");
m.setName("oF"); m.setName("administrator");
m.setPhone("00000000"); m.setPhone("00000000");
Member res = this.memberService.signup(m); Member res = this.memberService.signup(m);
Assert.assertNotNull(res); Assert.assertNotNull(res);
} }
@Test
public void signin() throws Exception {
Member m = this.memberService.signin("overflow@loafle.com", "!@#$qwer1234");
Assert.assertNotNull(m);
}
} }