diff options
Diffstat (limited to 'server/tests/utils/users/login.ts')
-rw-r--r-- | server/tests/utils/users/login.ts | 10 |
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 | ||
29 | async function loginAndGetAccessToken (server: Server) { | 29 | async 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 | ||
35 | async function getUserAccessToken (server: Server, user: User) { | 35 | async 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 | ||
54 | export { | 54 | export { |
55 | login, | 55 | login, |
56 | loginAndGetAccessToken, | 56 | serverLogin, |
57 | getUserAccessToken, | 57 | userLogin, |
58 | setAccessTokensToServers | 58 | setAccessTokensToServers |
59 | } | 59 | } |