]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/feeds/feeds.ts
Use largest avatar in RSS feeds, unique guid for liveItems (#5817)
[github/Chocobozzz/PeerTube.git] / server / tests / feeds / feeds.ts
index 57eefff6d7cb44a0f2cf617a76c0bd3fb3b85c5e..286c03596a12a1d5aab2157b953e9451d03157ac 100644 (file)
@@ -177,6 +177,10 @@ describe('Test syndication feeds', () => {
         const parser = new XMLParser({ parseAttributeValue: true, ignoreAttributes: false })
         const xmlDoc = parser.parse(rss)
 
+        const itemGuid = xmlDoc.rss.channel.item.guid
+        expect(itemGuid).to.exist
+        expect(itemGuid['@_isPermaLink']).to.equal(true)
+
         const enclosure = xmlDoc.rss.channel.item.enclosure
         expect(enclosure).to.exist
         const alternateEnclosure = xmlDoc.rss.channel.item['podcast:alternateEnclosure']
@@ -202,6 +206,10 @@ describe('Test syndication feeds', () => {
         const parser = new XMLParser({ parseAttributeValue: true, ignoreAttributes: false })
         const xmlDoc = parser.parse(rss)
 
+        const itemGuid = xmlDoc.rss.channel.item.guid
+        expect(itemGuid).to.exist
+        expect(itemGuid['@_isPermaLink']).to.equal(true)
+
         const enclosure = xmlDoc.rss.channel.item.enclosure
         const alternateEnclosure = xmlDoc.rss.channel.item['podcast:alternateEnclosure']
         expect(alternateEnclosure).to.exist
@@ -286,6 +294,8 @@ describe('Test syndication feeds', () => {
         const xmlDoc = parser.parse(rss)
         const liveItem = xmlDoc.rss.channel['podcast:liveItem']
         expect(liveItem.title).to.equal('live-0')
+        expect(liveItem.guid['@_isPermaLink']).to.equal(false)
+        expect(liveItem.guid['#text']).to.contain(`${uuid}_`)
         expect(liveItem['@_status']).to.equal('live')
 
         const enclosure = liveItem.enclosure