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

Add originallyPublishedAt unit tests

This commit is contained in:
Chocobozzz 2019-02-11 14:41:55 +01:00
parent 6913f69134
commit 7519127b5c
No known key found for this signature in database
GPG key ID: 583A612D890159BE
8 changed files with 49 additions and 8 deletions

View file

@ -54,6 +54,7 @@ function sanitizeAndCheckVideoTorrentObject (video: any) {
isBooleanValid(video.downloadEnabled) &&
isDateValid(video.published) &&
isDateValid(video.updated) &&
(!video.originallyPublishedAt || isDateValid(video.originallyPublishedAt)) &&
(!video.content || isRemoteVideoContentValid(video.mediaType, video.content)) &&
isRemoteVideoIconValid(video.icon) &&
video.url.length !== 0 &&