Skip to content

Commit

Permalink
test: #57 add mission test code
Browse files Browse the repository at this point in the history
  • Loading branch information
junjuning committed Jan 10, 2023
1 parent 0ecfe80 commit 36aaf14
Showing 1 changed file with 48 additions and 1 deletion.
49 changes: 48 additions & 1 deletion src/test/mission.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ describe('GET /mission/month/:month', () => {
// 월별 조회 200 케이스
it('월별 조회 - 성공', (done) => {
req(app)
.get('/api/mission/month/:month')
.get(`/api/mission/month/${2023-01}`)
.set('Content-Type', 'application/json')
.set({ Authorization: `${process.env.TEST_ACCESS_TOKEN}` })
.expect(200)
Expand All @@ -289,3 +289,50 @@ describe('GET /mission/month/:month', () => {
});
});
});


/**
* 낫투두 통계
* 200 케이스
*/
describe('GET /mission/stat/notTodo', () => {
// 낫투두 통계 200 케이스
it('낫투두 통계 조회 - 성공', (done) => {
req(app)
.get('/api/mission/stat/notTodo')
.set('Content-Type', 'application/json')
.set({ Authorization: `${process.env.TEST_ACCESS_TOKEN}` })
.expect(200)
.expect('Content-Type', /json/)
.then((res) => {
done();
})
.catch((err) => {
console.error('######Error >>', err);
done(err);
});
});
});

/**
* 상황별 통계
* 200 케이스
*/
describe('GET /mission/stat/situation', () => {
// 상황별 통계 200 케이스
it('상황별 통계 조회 - 성공', (done) => {
req(app)
.get('/api/mission/stat/situation')
.set('Content-Type', 'application/json')
.set({ Authorization: `${process.env.TEST_ACCESS_TOKEN}` })
.expect(200)
.expect('Content-Type', /json/)
.then((res) => {
done();
})
.catch((err) => {
console.error('######Error >>', err);
done(err);
});
});
});

0 comments on commit 36aaf14

Please sign in to comment.