aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 10:42:24 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commitc0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea (patch)
treebaf29753ac5d4598643e3bee719f8df0cc36c59d /server/tests/api/users
parent08642a765ea514a00f159db898edf14c376fbe6c (diff)
downloadPeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.tar.gz
PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.tar.zst
PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.zip
Refactor requests
Diffstat (limited to 'server/tests/api/users')
-rw-r--r--server/tests/api/users/users-multiple-servers.ts4
-rw-r--r--server/tests/api/users/users-verification.ts2
-rw-r--r--server/tests/api/users/users.ts4
3 files changed, 5 insertions, 5 deletions
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 () {
131 131
132 it('Should list account videos', async function () { 132 it('Should list account videos', async function () {
133 for (const server of servers) { 133 for (const server of servers) {
134 const { total, data } = await server.videos.listByAccount({ accountName: 'user1@localhost:' + servers[0].port }) 134 const { total, data } = await server.videos.listByAccount({ handle: 'user1@localhost:' + servers[0].port })
135 135
136 expect(total).to.equal(1) 136 expect(total).to.equal(1)
137 expect(data).to.be.an('array') 137 expect(data).to.be.an('array')
@@ -148,7 +148,7 @@ describe('Test users with multiple servers', function () {
148 await waitJobs(servers) 148 await waitJobs(servers)
149 149
150 for (const server of servers) { 150 for (const server of servers) {
151 const { total, data } = await server.videos.listByAccount({ accountName: 'user1@localhost:' + servers[0].port, search: 'Kami' }) 151 const { total, data } = await server.videos.listByAccount({ handle: 'user1@localhost:' + servers[0].port, search: 'Kami' })
152 152
153 expect(total).to.equal(1) 153 expect(total).to.equal(1)
154 expect(data).to.be.an('array') 154 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 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { HttpStatusCode } from '@shared/core-utils' 5import { HttpStatusCode } from '@shared/models'
6import { cleanupTests, createSingleServer, MockSmtpServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils' 6import { cleanupTests, createSingleServer, MockSmtpServer, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
7 7
8const expect = chai.expect 8const 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 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { HttpStatusCode } from '@shared/core-utils' 5import { HttpStatusCode } from '@shared/models'
6import { 6import {
7 cleanupTests, 7 cleanupTests,
8 createSingleServer, 8 createSingleServer,
@@ -215,7 +215,7 @@ describe('Test users', function () {
215 path: path + videoId, 215 path: path + videoId,
216 token: 'wrong token', 216 token: 'wrong token',
217 fields: data, 217 fields: data,
218 statusCodeExpected: HttpStatusCode.UNAUTHORIZED_401 218 expectedStatus: HttpStatusCode.UNAUTHORIZED_401
219 } 219 }
220 await makePutBodyRequest(options) 220 await makePutBodyRequest(options)
221 }) 221 })