From c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 16 Jul 2021 10:42:24 +0200 Subject: Refactor requests --- server/tests/api/users/users-multiple-servers.ts | 4 ++-- server/tests/api/users/users-verification.ts | 2 +- server/tests/api/users/users.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'server/tests/api/users') diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts index e629966bb..e304e5d67 100644 --- a/server/tests/api/users/users-multiple-servers.ts +++ b/server/tests/api/users/users-multiple-servers.ts @@ -131,7 +131,7 @@ describe('Test users with multiple servers', function () { it('Should list account videos', async function () { for (const server of servers) { - const { total, data } = await server.videos.listByAccount({ accountName: 'user1@localhost:' + servers[0].port }) + const { total, data } = await server.videos.listByAccount({ handle: 'user1@localhost:' + servers[0].port }) expect(total).to.equal(1) expect(data).to.be.an('array') @@ -148,7 +148,7 @@ describe('Test users with multiple servers', function () { await waitJobs(servers) for (const server of servers) { - const { total, data } = await server.videos.listByAccount({ accountName: 'user1@localhost:' + servers[0].port, search: 'Kami' }) + const { total, data } = await server.videos.listByAccount({ handle: 'user1@localhost:' + servers[0].port, search: 'Kami' }) expect(total).to.equal(1) expect(data).to.be.an('array') diff --git a/server/tests/api/users/users-verification.ts b/server/tests/api/users/users-verification.ts index 5dbe2af59..56fc25048 100644 --- a/server/tests/api/users/users-verification.ts +++ b/server/tests/api/users/users-verification.ts @@ -2,7 +2,7 @@ import 'mocha' import * as chai from 'chai' -import { HttpStatusCode } from '@shared/core-utils' +import { HttpStatusCode } from '@shared/models' import { cleanupTests, createSingleServer, MockSmtpServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils' const expect = chai.expect diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index 6ae5410b3..be80c2616 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts @@ -2,7 +2,7 @@ import 'mocha' import * as chai from 'chai' -import { HttpStatusCode } from '@shared/core-utils' +import { HttpStatusCode } from '@shared/models' import { cleanupTests, createSingleServer, @@ -215,7 +215,7 @@ describe('Test users', function () { path: path + videoId, token: 'wrong token', fields: data, - statusCodeExpected: HttpStatusCode.UNAUTHORIZED_401 + expectedStatus: HttpStatusCode.UNAUTHORIZED_401 } await makePutBodyRequest(options) }) -- cgit v1.2.3