기본 그룹 insert sql 추가
This commit is contained in:
parent
73b5ba7545
commit
1cc236a683
|
@ -12,11 +12,11 @@ spring:
|
|||
data-username: postgres
|
||||
password: qwer5795
|
||||
username: postgres
|
||||
|
||||
# JPA properties
|
||||
initialization-mode: never
|
||||
jpa:
|
||||
hibernate:
|
||||
ddl-auto: create-drop
|
||||
ddl-auto: update
|
||||
database: postgresql
|
||||
show-sql: true
|
||||
database-platform: org.hibernate.dialect.PostgreSQLDialect
|
||||
|
|
14
src/main/resources/data.sql
Normal file
14
src/main/resources/data.sql
Normal file
|
@ -0,0 +1,14 @@
|
|||
insert into public.tbl_user_group
|
||||
(id ,title, description, is_default, register_date)
|
||||
values
|
||||
(1, '관리자', '관리자 그룹', false, '2019-07-20 12:00:30');
|
||||
|
||||
insert into public.tbl_user_group
|
||||
(id ,title, description, is_default, register_date)
|
||||
values
|
||||
(2, '정회원', '정회원 그룹', true, '2019-07-20 12:00:30');
|
||||
|
||||
insert into public.tbl_user_group
|
||||
(id ,title, description, is_default, register_date)
|
||||
values
|
||||
(3, '비회원', '비회원 그룹', false, '2019-07-20 12:00:30');
|
|
@ -38,6 +38,8 @@ public class UserRepositoryTest {
|
|||
|
||||
@Test
|
||||
public void findByUsername() throws Exception {
|
||||
User admin = this.userRepository.findByUsername("admin");
|
||||
if (admin == null) {
|
||||
User tempUser = user.build();
|
||||
|
||||
this.userRepository.save(tempUser);
|
||||
|
@ -46,6 +48,7 @@ public class UserRepositoryTest {
|
|||
|
||||
assertEquals("Equlas", user.build().getUsername(), user1.getUsername());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void findByEmail() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user