mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Fix external auth email/password update
Also check if an actor does not already exist when creating the user
This commit is contained in:
@@ -1044,7 +1044,7 @@ describe('Test users API validators', function () {
|
||||
}
|
||||
await importVideo(server.url, server.accessToken, immutableAssign(baseAttributes, { targetUrl: getYoutubeVideoUrl() }))
|
||||
await importVideo(server.url, server.accessToken, immutableAssign(baseAttributes, { magnetUri: getMagnetURI() }))
|
||||
await importVideo(server.url, server.accessToken, immutableAssign(baseAttributes, { torrentfile: 'video-720p.torrent' }))
|
||||
await importVideo(server.url, server.accessToken, immutableAssign(baseAttributes, { torrentfile: 'video-720p.torrent' as any }))
|
||||
|
||||
await waitJobs([ server ])
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ Ajouter un sous-titre est vraiment facile`)
|
||||
|
||||
{
|
||||
const attributes = immutableAssign(baseAttributes, {
|
||||
torrentfile: 'video-720p.torrent',
|
||||
torrentfile: 'video-720p.torrent' as any,
|
||||
description: 'this is a super torrent description',
|
||||
tags: [ 'tag_torrent1', 'tag_torrent2' ]
|
||||
})
|
||||
|
||||
@@ -255,6 +255,16 @@ describe('Test external auth plugins', function () {
|
||||
expect(body.role).to.equal(UserRole.USER)
|
||||
})
|
||||
|
||||
it('Should not update an external auth email', async function () {
|
||||
await updateMyUser({
|
||||
url: server.url,
|
||||
accessToken: cyanAccessToken,
|
||||
email: 'toto@example.com',
|
||||
currentPassword: 'toto',
|
||||
statusCodeExpected: 400
|
||||
})
|
||||
})
|
||||
|
||||
it('Should reject token of Kefka by the plugin hook', async function () {
|
||||
this.timeout(10000)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user