aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/users/login.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils/users/login.ts')
-rw-r--r--server/tests/utils/users/login.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/tests/utils/users/login.ts b/server/tests/utils/users/login.ts
index 855c4828d..04444e2f1 100644
--- a/server/tests/utils/users/login.ts
+++ b/server/tests/utils/users/login.ts
@@ -26,13 +26,13 @@ function login (url: string, client: Client, user: User, expectedStatus = 200) {
26 .expect(expectedStatus) 26 .expect(expectedStatus)
27} 27}
28 28
29async function loginAndGetAccessToken (server: Server) { 29async function serverLogin (server: Server) {
30 const res = await login(server.url, server.client, server.user, 200) 30 const res = await login(server.url, server.client, server.user, 200)
31 31
32 return res.body.access_token as string 32 return res.body.access_token as string
33} 33}
34 34
35async function getUserAccessToken (server: Server, user: User) { 35async function userLogin (server: Server, user: User) {
36 const res = await login(server.url, server.client, user, 200) 36 const res = await login(server.url, server.client, user, 200)
37 37
38 return res.body.access_token as string 38 return res.body.access_token as string
@@ -42,7 +42,7 @@ function setAccessTokensToServers (servers: ServerInfo[]) {
42 const tasks: Promise<any>[] = [] 42 const tasks: Promise<any>[] = []
43 43
44 for (const server of servers) { 44 for (const server of servers) {
45 const p = loginAndGetAccessToken(server).then(t => server.accessToken = t) 45 const p = serverLogin(server).then(t => server.accessToken = t)
46 tasks.push(p) 46 tasks.push(p)
47 } 47 }
48 48
@@ -53,7 +53,7 @@ function setAccessTokensToServers (servers: ServerInfo[]) {
53 53
54export { 54export {
55 login, 55 login,
56 loginAndGetAccessToken, 56 serverLogin,
57 getUserAccessToken, 57 userLogin,
58 setAccessTokensToServers 58 setAccessTokensToServers
59} 59}