-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from IoTeaTime/test/77-kan-132-user-domain-rename
fix: 테스트코드 user 도메인 이름 변경
- Loading branch information
Showing
2 changed files
with
13 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,8 @@ | |
import org.ioteatime.meonghanyangserver.device.repository.DeviceRepository; | ||
import org.ioteatime.meonghanyangserver.group.domain.GroupEntity; | ||
import org.ioteatime.meonghanyangserver.group.repository.GroupRepository; | ||
import org.ioteatime.meonghanyangserver.user.domain.UserEntity; | ||
import org.ioteatime.meonghanyangserver.user.repository.UserRepository; | ||
import org.ioteatime.meonghanyangserver.member.domain.MemberEntity; | ||
import org.ioteatime.meonghanyangserver.member.repository.MemberRepository; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
|
@@ -26,24 +26,24 @@ | |
@SpringBootTest | ||
class CctvControllerTest extends ControllerTestConfig { | ||
@Autowired private JwtUtils jwtUtils; | ||
@Autowired private UserRepository userRepository; | ||
@Autowired private MemberRepository memberRepository; | ||
@Autowired private CctvRepository cctvRepository; | ||
@Autowired private GroupRepository groupRepository; | ||
@Autowired private DeviceRepository deviceRepository; | ||
|
||
private String accessToken; | ||
private UserEntity user; | ||
private MemberEntity member; | ||
|
||
@BeforeEach | ||
public void beforeEach() { | ||
user = | ||
UserEntity.builder() | ||
member = | ||
MemberEntity.builder() | ||
.email("[email protected]") | ||
.nickname("test") | ||
.password("testpassword") | ||
.build(); | ||
userRepository.save(user); | ||
accessToken = jwtUtils.includeBearer(jwtUtils.generateAccessToken(user)); | ||
memberRepository.save(member); | ||
accessToken = jwtUtils.includeBearer(jwtUtils.generateAccessToken(member)); | ||
} | ||
|
||
@Test | ||
|
@@ -53,7 +53,7 @@ public void beforeEach() { | |
|
||
DeviceEntity device2 = | ||
DeviceEntity.builder() | ||
.user(user) | ||
.member(member) | ||
.group(group) | ||
.deviceUuid("test2") | ||
.role(DeviceRole.ROLE_CCTV) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters