Skip to content

Commit

Permalink
test: story update API에서 업데이트할 프로퍼티가 존재하지 않을 경우 에러임을 확인하는 테스트 추가
Browse files Browse the repository at this point in the history
- 장애가 발생한 케이스에 대한 회귀테스트임
  • Loading branch information
choyoungwoo9 committed Jul 18, 2024
1 parent c409134 commit 8355ba7
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions backend/test/project/ws-backlog-page/ws-story.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,43 @@ describe('WS story', () => {
});
});
};

it('should return error when updated property is do not exist', async () => {
const socket = await getMemberJoinedLandingPage();
socket.emit('joinBacklog');
await initBacklog(socket);

const name = '회원';
const color = 'yellow';
let requestData: any = {
action: 'create',
content: { name, color },
};
socket.emit('epic', requestData);
const [epicId] = await Promise.all([getEpicId(socket)]);

const title = '타이틀';
const point = 2;
const status = '시작전';
requestData = {
action: 'create',
content: { title, point, status, epicId },
};
socket.emit('story', requestData);
const storyId = await getStoryId(socket);

requestData = {
action: 'update',
content: { id: storyId },
};
socket.emit('story', requestData);
await new Promise<void>((resolve) => {
socket.on('error', () => {
resolve();
});
});
socket.close();
});
});
});

Expand Down

0 comments on commit 8355ba7

Please sign in to comment.