mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-08 05:59:00 +08:00
test: add template enclosure test cases
This commit is contained in:
@@ -49,6 +49,17 @@ module.exports = async (ctx) => {
|
||||
item = null;
|
||||
}
|
||||
|
||||
if (ctx.params.id === 'enclosure') {
|
||||
item = [
|
||||
{
|
||||
title: '',
|
||||
link: 'https://github.com/DIYgod/RSSHub/issues/1',
|
||||
enclosure_url: 'https://github.com/DIYgod/RSSHub/issues/1',
|
||||
enclosure_length: 3661,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
if (ctx.query.mode === 'fulltext') {
|
||||
item = [
|
||||
{
|
||||
@@ -60,6 +71,7 @@ module.exports = async (ctx) => {
|
||||
|
||||
ctx.state.data = {
|
||||
title: `Test ${ctx.params.id}`,
|
||||
itunes_author: ctx.params.id === 'enclosure' ? 'DIYgod' : null,
|
||||
link: 'https://github.com/DIYgod/RSSHub',
|
||||
item,
|
||||
allowEmpty: ctx.params.id === 'allow_empty',
|
||||
|
||||
Reference in New Issue
Block a user