hugolib: Only return RSSLink when RSS is available

Fixes #1302
This commit is contained in:
Bjørn Erik Pedersen
2017-03-01 12:30:41 +01:00
parent b7a672fd22
commit cc15864744
4 changed files with 14 additions and 4 deletions

View File

@@ -15,6 +15,7 @@ package hugolib
import (
"fmt"
"html/template"
"path/filepath"
"reflect"
"testing"
@@ -125,6 +126,10 @@ others:
s := h.Sites[0]
// Issue #1302
term := s.getPage(KindTaxonomyTerm, "others")
require.Equal(t, template.URL(""), term.RSSLink)
// Issue #3070 preserveTaxonomyNames
if preserveTaxonomyNames {
helloWorld := s.getPage(KindTaxonomy, "others", "Hello Hugo world")