From 9fff08cf83f34339df7ed4ac770e1dee536adf9d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 7 Jul 2021 13:38:26 +0200 Subject: Introduce accounts command --- server/tests/api/check-params/accounts.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'server/tests/api/check-params/accounts.ts') 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 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ import 'mocha' - -import { cleanupTests, 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' -import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' + checkBadStartPagination, + cleanupTests, + flushAndRunServer, + ServerInfo +} from '@shared/extra-utils' describe('Test accounts API validators', function () { const path = '/api/v1/accounts/' @@ -38,8 +38,9 @@ describe('Test accounts API validators', function () { }) describe('When getting an account', function () { + it('Should return 404 with a non existing name', async function () { - await getAccount(server.url, 'arfaze', HttpStatusCode.NOT_FOUND_404) + await server.accountsCommand.get({ accountName: 'arfaze', expectedStatus: HttpStatusCode.NOT_FOUND_404 }) }) }) -- cgit v1.2.3