Skip to content

Commit 21764ee

Browse files
committed
refactor: 레포 계층과의 중복 테스트코드 제거
1 parent b08d834 commit 21764ee

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

src/services/__test__/qr.service.test.ts

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -53,35 +53,6 @@ describe('UserService 의 QRService', () => {
5353
});
5454
});
5555

56-
describe('getByToken', () => {
57-
it('유효한 토큰 조회 시 반환해야 한다', async () => {
58-
const mockToken: QRLoginToken = {
59-
token: 'token',
60-
user: 1,
61-
created_at: new Date(),
62-
expires_at: new Date(),
63-
is_used: false,
64-
ip_address: '127.0.0.1',
65-
user_agent: 'Chrome',
66-
};
67-
repo.findQRLoginToken.mockResolvedValue(mockToken);
68-
69-
const result = await repo.findQRLoginToken('token');
70-
expect(result).toEqual(mockToken);
71-
});
72-
73-
it('토큰이 없으면 null 반환', async () => {
74-
repo.findQRLoginToken.mockResolvedValue(null);
75-
const result = await repo.findQRLoginToken('token');
76-
expect(result).toBeNull();
77-
});
78-
79-
it('조회 중 오류 발생 시 예외 발생', async () => {
80-
repo.findQRLoginToken.mockRejectedValueOnce(new DBError('조회 실패'));
81-
await expect(repo.findQRLoginToken('token')).rejects.toThrow('조회 실패');
82-
});
83-
});
84-
8556
describe('useToken', () => {
8657
it('유효한 토큰 사용 처리 후 반환', async () => {
8758
const mockToken: QRLoginToken = {

0 commit comments

Comments
 (0)