Fix jobs tests

pull/1093/head
Chocobozzz 2018-09-19 17:42:16 +02:00
parent 993cef4b6e
commit f41d6aacdf
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 4 additions and 2 deletions

View File

@ -31,7 +31,7 @@ export function checkUserCanTerminateOwnershipChange (
videoChangeOwnership: VideoChangeOwnershipModel,
res: Response
): boolean {
if (videoChangeOwnership.NextOwner.userId === user.Account.userId) {
if (videoChangeOwnership.NextOwner.userId === user.id) {
return true
}

View File

@ -45,7 +45,9 @@ describe('Test jobs', function () {
expect(res.body.total).to.be.above(2)
expect(res.body.data).to.have.lengthOf(1)
const job = res.body.data[0]
let job = res.body.data[0]
// Skip repeat jobs
if (job.type === 'videos-views') job = res.body.data[1]
expect(job.state).to.equal('completed')
expect(job.type).to.equal('activitypub-follow')