aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/feeds
diff options
context:
space:
mode:
authorAlecks Gates <agates@mail.agates.io>2023-06-05 02:00:30 -0500
committerGitHub <noreply@github.com>2023-06-05 09:00:30 +0200
commit1ed1994fffb18a2b0bd74e49b50067ab047f8ab8 (patch)
tree9f06f52d9a376e75066a4a6f01079cb96de1ba6a /server/tests/feeds
parent9a64621975097f648f6bf19f15b03ba3820918f2 (diff)
downloadPeerTube-1ed1994fffb18a2b0bd74e49b50067ab047f8ab8.tar.gz
PeerTube-1ed1994fffb18a2b0bd74e49b50067ab047f8ab8.tar.zst
PeerTube-1ed1994fffb18a2b0bd74e49b50067ab047f8ab8.zip
Use largest avatar in RSS feeds, unique guid for liveItems (#5817)
* Attempt to get largest avatar size * WIP live guid changes * Use largest avatar version in feeds * Misc variable names/import changes * Update podcast feed tests for guid changes * More <guid> testing * Lint fix * Styling --------- Co-authored-by: Chocobozzz <me@florianbigard.com>
Diffstat (limited to 'server/tests/feeds')
-rw-r--r--server/tests/feeds/feeds.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/tests/feeds/feeds.ts b/server/tests/feeds/feeds.ts
index 57eefff6d..286c03596 100644
--- a/server/tests/feeds/feeds.ts
+++ b/server/tests/feeds/feeds.ts
@@ -177,6 +177,10 @@ describe('Test syndication feeds', () => {
177 const parser = new XMLParser({ parseAttributeValue: true, ignoreAttributes: false }) 177 const parser = new XMLParser({ parseAttributeValue: true, ignoreAttributes: false })
178 const xmlDoc = parser.parse(rss) 178 const xmlDoc = parser.parse(rss)
179 179
180 const itemGuid = xmlDoc.rss.channel.item.guid
181 expect(itemGuid).to.exist
182 expect(itemGuid['@_isPermaLink']).to.equal(true)
183
180 const enclosure = xmlDoc.rss.channel.item.enclosure 184 const enclosure = xmlDoc.rss.channel.item.enclosure
181 expect(enclosure).to.exist 185 expect(enclosure).to.exist
182 const alternateEnclosure = xmlDoc.rss.channel.item['podcast:alternateEnclosure'] 186 const alternateEnclosure = xmlDoc.rss.channel.item['podcast:alternateEnclosure']
@@ -202,6 +206,10 @@ describe('Test syndication feeds', () => {
202 const parser = new XMLParser({ parseAttributeValue: true, ignoreAttributes: false }) 206 const parser = new XMLParser({ parseAttributeValue: true, ignoreAttributes: false })
203 const xmlDoc = parser.parse(rss) 207 const xmlDoc = parser.parse(rss)
204 208
209 const itemGuid = xmlDoc.rss.channel.item.guid
210 expect(itemGuid).to.exist
211 expect(itemGuid['@_isPermaLink']).to.equal(true)
212
205 const enclosure = xmlDoc.rss.channel.item.enclosure 213 const enclosure = xmlDoc.rss.channel.item.enclosure
206 const alternateEnclosure = xmlDoc.rss.channel.item['podcast:alternateEnclosure'] 214 const alternateEnclosure = xmlDoc.rss.channel.item['podcast:alternateEnclosure']
207 expect(alternateEnclosure).to.exist 215 expect(alternateEnclosure).to.exist
@@ -286,6 +294,8 @@ describe('Test syndication feeds', () => {
286 const xmlDoc = parser.parse(rss) 294 const xmlDoc = parser.parse(rss)
287 const liveItem = xmlDoc.rss.channel['podcast:liveItem'] 295 const liveItem = xmlDoc.rss.channel['podcast:liveItem']
288 expect(liveItem.title).to.equal('live-0') 296 expect(liveItem.title).to.equal('live-0')
297 expect(liveItem.guid['@_isPermaLink']).to.equal(false)
298 expect(liveItem.guid['#text']).to.contain(`${uuid}_`)
289 expect(liveItem['@_status']).to.equal('live') 299 expect(liveItem['@_status']).to.equal('live')
290 300
291 const enclosure = liveItem.enclosure 301 const enclosure = liveItem.enclosure