1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Add a rewrite rule for castopod episodes

This commit is contained in:
Romain de Laage 2022-01-30 09:11:43 +01:00 committed by Frédéric Guillot
parent 7a1429bcc1
commit 808635e314
3 changed files with 17 additions and 0 deletions

View file

@ -286,3 +286,12 @@ func TestRewriteRemoveCustom(t *testing.T) {
t.Errorf(`Not expected output: %s`, output)
}
}
func TestRewriteAddCastopodEpisode(t *testing.T) {
output := Rewriter("https://podcast.demo/@demo/episodes/test", "Episode Description", `add_castopod_episode`)
expected := `<iframe width="650" frameborder="0" src="https://podcast.demo/@demo/episodes/test/embed/light"></iframe><br>Episode Description`
if expected != output {
t.Errorf(`Not expected output: got "%s" instead of "%s"`, output, expected)
}
}