diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-14 16:52:22 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-06-15 08:21:12 +0200 |
commit | 3d470a530c4a48b2e4f4a9e7d4f223e14f32cea4 (patch) | |
tree | 7305399caecbf7380319bd08e21c933de88096dc /server/tests/api/check-params/users.ts | |
parent | 79db409a41bd28fd2773626c9a93b5d326a38bc0 (diff) | |
download | PeerTube-3d470a530c4a48b2e4f4a9e7d4f223e14f32cea4.tar.gz PeerTube-3d470a530c4a48b2e4f4a9e7d4f223e14f32cea4.tar.zst PeerTube-3d470a530c4a48b2e4f4a9e7d4f223e14f32cea4.zip |
Faster ci using compiled ts files
Diffstat (limited to 'server/tests/api/check-params/users.ts')
-rw-r--r-- | server/tests/api/check-params/users.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts index dcff0d52b..36482ee17 100644 --- a/server/tests/api/check-params/users.ts +++ b/server/tests/api/check-params/users.ts | |||
@@ -2,12 +2,12 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { omit } from 'lodash' | 4 | import { omit } from 'lodash' |
5 | import { join } from 'path' | ||
6 | import { User, UserRole } from '../../../../shared' | 5 | import { User, UserRole } from '../../../../shared' |
7 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | 6 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' |
8 | import { | 7 | import { |
9 | addVideoChannel, | 8 | addVideoChannel, |
10 | blockUser, | 9 | blockUser, |
10 | buildAbsoluteFixturePath, | ||
11 | cleanupTests, | 11 | cleanupTests, |
12 | createUser, | 12 | createUser, |
13 | deleteMe, | 13 | deleteMe, |
@@ -600,7 +600,7 @@ describe('Test users API validators', function () { | |||
600 | it('Should fail without an incorrect input file', async function () { | 600 | it('Should fail without an incorrect input file', async function () { |
601 | const fields = {} | 601 | const fields = {} |
602 | const attaches = { | 602 | const attaches = { |
603 | avatarfile: join(__dirname, '..', '..', 'fixtures', 'video_short.mp4') | 603 | avatarfile: buildAbsoluteFixturePath('video_short.mp4') |
604 | } | 604 | } |
605 | await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches }) | 605 | await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches }) |
606 | }) | 606 | }) |
@@ -608,7 +608,7 @@ describe('Test users API validators', function () { | |||
608 | it('Should fail with a big file', async function () { | 608 | it('Should fail with a big file', async function () { |
609 | const fields = {} | 609 | const fields = {} |
610 | const attaches = { | 610 | const attaches = { |
611 | avatarfile: join(__dirname, '..', '..', 'fixtures', 'avatar-big.png') | 611 | avatarfile: buildAbsoluteFixturePath('avatar-big.png') |
612 | } | 612 | } |
613 | await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches }) | 613 | await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches }) |
614 | }) | 614 | }) |
@@ -616,7 +616,7 @@ describe('Test users API validators', function () { | |||
616 | it('Should fail with an unauthenticated user', async function () { | 616 | it('Should fail with an unauthenticated user', async function () { |
617 | const fields = {} | 617 | const fields = {} |
618 | const attaches = { | 618 | const attaches = { |
619 | avatarfile: join(__dirname, '..', '..', 'fixtures', 'avatar.png') | 619 | avatarfile: buildAbsoluteFixturePath('avatar.png') |
620 | } | 620 | } |
621 | await makeUploadRequest({ | 621 | await makeUploadRequest({ |
622 | url: server.url, | 622 | url: server.url, |
@@ -630,7 +630,7 @@ describe('Test users API validators', function () { | |||
630 | it('Should succeed with the correct params', async function () { | 630 | it('Should succeed with the correct params', async function () { |
631 | const fields = {} | 631 | const fields = {} |
632 | const attaches = { | 632 | const attaches = { |
633 | avatarfile: join(__dirname, '..', '..', 'fixtures', 'avatar.png') | 633 | avatarfile: buildAbsoluteFixturePath('avatar.png') |
634 | } | 634 | } |
635 | await makeUploadRequest({ | 635 | await makeUploadRequest({ |
636 | url: server.url, | 636 | url: server.url, |