aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/accounts.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-07 13:38:26 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:17 +0200
commit9fff08cf83f34339df7ed4ac770e1dee536adf9d (patch)
tree36eac5147a12ae257a3e8aaeffae37c9aed23d0a /server/tests/api/check-params/accounts.ts
parent87e2635a50ac2decb1c330e55c2ff7b6d07a85de (diff)
downloadPeerTube-9fff08cf83f34339df7ed4ac770e1dee536adf9d.tar.gz
PeerTube-9fff08cf83f34339df7ed4ac770e1dee536adf9d.tar.zst
PeerTube-9fff08cf83f34339df7ed4ac770e1dee536adf9d.zip
Introduce accounts command
Diffstat (limited to 'server/tests/api/check-params/accounts.ts')
-rw-r--r--server/tests/api/check-params/accounts.ts15
1 files changed, 8 insertions, 7 deletions
diff --git a/server/tests/api/check-params/accounts.ts b/server/tests/api/check-params/accounts.ts
index d1712cff6..45d440c47 100644
--- a/server/tests/api/check-params/accounts.ts
+++ b/server/tests/api/check-params/accounts.ts
@@ -1,15 +1,15 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import 'mocha' 3import 'mocha'
4 4import { HttpStatusCode } from '@shared/core-utils'
5import { cleanupTests, flushAndRunServer, ServerInfo } from '../../../../shared/extra-utils'
6import { 5import {
7 checkBadCountPagination, 6 checkBadCountPagination,
8 checkBadSortPagination, 7 checkBadSortPagination,
9 checkBadStartPagination 8 checkBadStartPagination,
10} from '../../../../shared/extra-utils/requests/check-api-params' 9 cleanupTests,
11import { getAccount } from '../../../../shared/extra-utils/users/accounts' 10 flushAndRunServer,
12import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' 11 ServerInfo
12} from '@shared/extra-utils'
13 13
14describe('Test accounts API validators', function () { 14describe('Test accounts API validators', function () {
15 const path = '/api/v1/accounts/' 15 const path = '/api/v1/accounts/'
@@ -38,8 +38,9 @@ describe('Test accounts API validators', function () {
38 }) 38 })
39 39
40 describe('When getting an account', function () { 40 describe('When getting an account', function () {
41
41 it('Should return 404 with a non existing name', async function () { 42 it('Should return 404 with a non existing name', async function () {
42 await getAccount(server.url, 'arfaze', HttpStatusCode.NOT_FOUND_404) 43 await server.accountsCommand.get({ accountName: 'arfaze', expectedStatus: HttpStatusCode.NOT_FOUND_404 })
43 }) 44 })
44 }) 45 })
45 46