aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-05-20 10:04:44 +0200
committerChocobozzz <me@florianbigard.com>2020-05-20 10:17:27 +0200
commit9a7fd9600bf513adffbf2127be7c3a8b4d31073f (patch)
treea2ac8e321f57f5c7add15ec8166a6a2e7bdf989a /server/tests
parent51539e95d954867d5c4561ac56843105253db79c (diff)
downloadPeerTube-9a7fd9600bf513adffbf2127be7c3a8b4d31073f.tar.gz
PeerTube-9a7fd9600bf513adffbf2127be7c3a8b4d31073f.tar.zst
PeerTube-9a7fd9600bf513adffbf2127be7c3a8b4d31073f.zip
Fix external auth email/password update
Also check if an actor does not already exist when creating the user
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/check-params/users.ts2
-rw-r--r--server/tests/api/videos/video-imports.ts2
-rw-r--r--server/tests/plugins/external-auth.ts10
3 files changed, 12 insertions, 2 deletions
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts
index 4d597f0a3..6e737af15 100644
--- a/server/tests/api/check-params/users.ts
+++ b/server/tests/api/check-params/users.ts
@@ -1044,7 +1044,7 @@ describe('Test users API validators', function () {
1044 } 1044 }
1045 await importVideo(server.url, server.accessToken, immutableAssign(baseAttributes, { targetUrl: getYoutubeVideoUrl() })) 1045 await importVideo(server.url, server.accessToken, immutableAssign(baseAttributes, { targetUrl: getYoutubeVideoUrl() }))
1046 await importVideo(server.url, server.accessToken, immutableAssign(baseAttributes, { magnetUri: getMagnetURI() })) 1046 await importVideo(server.url, server.accessToken, immutableAssign(baseAttributes, { magnetUri: getMagnetURI() }))
1047 await importVideo(server.url, server.accessToken, immutableAssign(baseAttributes, { torrentfile: 'video-720p.torrent' })) 1047 await importVideo(server.url, server.accessToken, immutableAssign(baseAttributes, { torrentfile: 'video-720p.torrent' as any }))
1048 1048
1049 await waitJobs([ server ]) 1049 await waitJobs([ server ])
1050 1050
diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.ts
index 4d5989f43..d211859e4 100644
--- a/server/tests/api/videos/video-imports.ts
+++ b/server/tests/api/videos/video-imports.ts
@@ -175,7 +175,7 @@ Ajouter un sous-titre est vraiment facile`)
175 175
176 { 176 {
177 const attributes = immutableAssign(baseAttributes, { 177 const attributes = immutableAssign(baseAttributes, {
178 torrentfile: 'video-720p.torrent', 178 torrentfile: 'video-720p.torrent' as any,
179 description: 'this is a super torrent description', 179 description: 'this is a super torrent description',
180 tags: [ 'tag_torrent1', 'tag_torrent2' ] 180 tags: [ 'tag_torrent1', 'tag_torrent2' ]
181 }) 181 })
diff --git a/server/tests/plugins/external-auth.ts b/server/tests/plugins/external-auth.ts
index a85672782..57361be05 100644
--- a/server/tests/plugins/external-auth.ts
+++ b/server/tests/plugins/external-auth.ts
@@ -255,6 +255,16 @@ describe('Test external auth plugins', function () {
255 expect(body.role).to.equal(UserRole.USER) 255 expect(body.role).to.equal(UserRole.USER)
256 }) 256 })
257 257
258 it('Should not update an external auth email', async function () {
259 await updateMyUser({
260 url: server.url,
261 accessToken: cyanAccessToken,
262 email: 'toto@example.com',
263 currentPassword: 'toto',
264 statusCodeExpected: 400
265 })
266 })
267
258 it('Should reject token of Kefka by the plugin hook', async function () { 268 it('Should reject token of Kefka by the plugin hook', async function () {
259 this.timeout(10000) 269 this.timeout(10000)
260 270