1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Add user history in import/export

This commit is contained in:
Chocobozzz 2024-02-28 16:22:51 +01:00
parent 7be401ac76
commit 98781f353d
No known key found for this signature in database
GPG key ID: 583A612D890159BE
24 changed files with 216 additions and 62 deletions

View file

@ -330,6 +330,18 @@ function runTest (withObjectStorage: boolean) {
}
})
it('Should have correctly imported user video history', async function () {
const { data } = await remoteServer.history.list({ token: remoteNoahToken })
expect(data).to.have.lengthOf(2)
expect(data[0].userHistory.currentTime).to.equal(2)
expect(data[0].url).to.equal(remoteServer.url + '/videos/watch/' + externalVideo.uuid)
expect(data[1].userHistory.currentTime).to.equal(4)
expect(data[1].url).to.equal(server.url + '/videos/watch/' + noahVideo.uuid)
})
it('Should have correctly imported user videos', async function () {
const { data } = await remoteServer.videos.listMyVideos({ token: remoteNoahToken })
expect(data).to.have.lengthOf(5)