diff options
Diffstat (limited to 'server/tests/api')
-rw-r--r-- | server/tests/api/server/jobs.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/server/tests/api/server/jobs.ts b/server/tests/api/server/jobs.ts index 19c8836b5..d0e222997 100644 --- a/server/tests/api/server/jobs.ts +++ b/server/tests/api/server/jobs.ts | |||
@@ -83,6 +83,19 @@ describe('Test jobs', function () { | |||
83 | } | 83 | } |
84 | }) | 84 | }) |
85 | 85 | ||
86 | it('Should list all jobs', async function () { | ||
87 | const res = await getJobsList(servers[1].url, servers[1].accessToken) | ||
88 | |||
89 | const jobs = res.body.data as Job[] | ||
90 | |||
91 | expect(res.body.total).to.be.above(2) | ||
92 | expect(jobs).to.have.length.above(2) | ||
93 | |||
94 | // We know there are a least 1 delayed job (video views) and 1 completed job (broadcast) | ||
95 | expect(jobs.find(j => j.state === 'delayed')).to.not.be.undefined | ||
96 | expect(jobs.find(j => j.state === 'completed')).to.not.be.undefined | ||
97 | }) | ||
98 | |||
86 | after(async function () { | 99 | after(async function () { |
87 | await cleanupTests(servers) | 100 | await cleanupTests(servers) |
88 | }) | 101 | }) |