diff options
Diffstat (limited to 'server/tests/utils/users.ts')
-rw-r--r-- | server/tests/utils/users.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/tests/utils/users.ts b/server/tests/utils/users.ts index ce04b9d96..a37d84ab4 100644 --- a/server/tests/utils/users.ts +++ b/server/tests/utils/users.ts | |||
@@ -111,12 +111,14 @@ function removeUser (url: string, userId: number, accessToken: string, expectedS | |||
111 | .expect(expectedStatus) | 111 | .expect(expectedStatus) |
112 | } | 112 | } |
113 | 113 | ||
114 | function updateMyUser (url: string, accessToken: string, newPassword: string, displayNSFW?: boolean, email?: string) { | 114 | function updateMyUser (url: string, accessToken: string, newPassword: string, displayNSFW?: boolean, |
115 | email?: string, autoPlayVideo?: boolean) { | ||
115 | const path = '/api/v1/users/me' | 116 | const path = '/api/v1/users/me' |
116 | 117 | ||
117 | const toSend = {} | 118 | const toSend = {} |
118 | if (newPassword !== undefined && newPassword !== null) toSend['password'] = newPassword | 119 | if (newPassword !== undefined && newPassword !== null) toSend['password'] = newPassword |
119 | if (displayNSFW !== undefined && displayNSFW !== null) toSend['displayNSFW'] = displayNSFW | 120 | if (displayNSFW !== undefined && displayNSFW !== null) toSend['displayNSFW'] = displayNSFW |
121 | if (autoPlayVideo !== undefined && autoPlayVideo !== null) toSend['autoPlayVideo'] = autoPlayVideo | ||
120 | if (email !== undefined && email !== null) toSend['email'] = email | 122 | if (email !== undefined && email !== null) toSend['email'] = email |
121 | 123 | ||
122 | return request(url) | 124 | return request(url) |