diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-12-08 21:16:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 21:16:10 +0100 |
commit | f2eb23cd87cf32b8fe545178143b5f49e06a58da (patch) | |
tree | af7d59945af70e28fd85047e2c688c59a908f548 /server/tests/api/check-params/accounts.ts | |
parent | c977fd3ec931c059111ddb2b8d6ddbb20b6b99a1 (diff) | |
download | PeerTube-f2eb23cd87cf32b8fe545178143b5f49e06a58da.tar.gz PeerTube-f2eb23cd87cf32b8fe545178143b5f49e06a58da.tar.zst PeerTube-f2eb23cd87cf32b8fe545178143b5f49e06a58da.zip |
emit more specific status codes on video upload (#3423)
- reduce http status codes list to potentially useful codes
- convert more codes to typed ones
- factorize html generator for error responses
Diffstat (limited to 'server/tests/api/check-params/accounts.ts')
-rw-r--r-- | server/tests/api/check-params/accounts.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/tests/api/check-params/accounts.ts b/server/tests/api/check-params/accounts.ts index c29af7cd7..d1712cff6 100644 --- a/server/tests/api/check-params/accounts.ts +++ b/server/tests/api/check-params/accounts.ts | |||
@@ -9,6 +9,7 @@ import { | |||
9 | checkBadStartPagination | 9 | checkBadStartPagination |
10 | } from '../../../../shared/extra-utils/requests/check-api-params' | 10 | } from '../../../../shared/extra-utils/requests/check-api-params' |
11 | import { getAccount } from '../../../../shared/extra-utils/users/accounts' | 11 | import { getAccount } from '../../../../shared/extra-utils/users/accounts' |
12 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
12 | 13 | ||
13 | describe('Test accounts API validators', function () { | 14 | describe('Test accounts API validators', function () { |
14 | const path = '/api/v1/accounts/' | 15 | const path = '/api/v1/accounts/' |
@@ -38,7 +39,7 @@ describe('Test accounts API validators', function () { | |||
38 | 39 | ||
39 | describe('When getting an account', function () { | 40 | describe('When getting an account', function () { |
40 | it('Should return 404 with a non existing name', async function () { | 41 | it('Should return 404 with a non existing name', async function () { |
41 | await getAccount(server.url, 'arfaze', 404) | 42 | await getAccount(server.url, 'arfaze', HttpStatusCode.NOT_FOUND_404) |
42 | }) | 43 | }) |
43 | }) | 44 | }) |
44 | 45 | ||