-/* tslint:disable:no-unused-expression */
+/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import 'mocha'
-
-import { flushTests, killallServers, flushAndRunServer, ServerInfo } from '../../../../shared/extra-utils'
+import { HttpStatusCode } from '@shared/core-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
- checkBadStartPagination
-} from '../../../../shared/extra-utils/requests/check-api-params'
-import { getAccount } from '../../../../shared/extra-utils/users/accounts'
+ checkBadStartPagination,
+ cleanupTests,
+ flushAndRunServer,
+ ServerInfo
+} from '@shared/extra-utils'
describe('Test accounts API validators', function () {
const path = '/api/v1/accounts/'
})
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.accountsCommand.get({ accountName: 'arfaze', expectedStatus: HttpStatusCode.NOT_FOUND_404 })
})
})
- after(function () {
- killallServers([ server ])
+ after(async function () {
+ await cleanupTests([ server ])
})
})