/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import 'mocha'
-
-import { cleanupTests, flushAndRunServer, ServerInfo } from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
- checkBadStartPagination
-} from '../../../../shared/extra-utils/requests/check-api-params'
-import { getAccount } from '../../../../shared/extra-utils/users/accounts'
+ checkBadStartPagination,
+ cleanupTests,
+ createSingleServer,
+ PeerTubeServer
+} from '@shared/extra-utils'
+import { HttpStatusCode } from '@shared/models'
describe('Test accounts API validators', function () {
const path = '/api/v1/accounts/'
- let server: ServerInfo
+ let server: PeerTubeServer
// ---------------------------------------------------------------
before(async function () {
this.timeout(30000)
- server = await flushAndRunServer(1)
+ server = await createSingleServer(1)
})
describe('When listing accounts', function () {
})
describe('When getting an account', function () {
+
it('Should return 404 with a non existing name', async function () {
- await getAccount(server.url, 'arfaze', 404)
+ await server.accounts.get({ accountName: 'arfaze', expectedStatus: HttpStatusCode.NOT_FOUND_404 })
})
})