Render main content language in root by default

Fixes #2312
This commit is contained in:
Bjørn Erik Pedersen
2016-08-08 13:55:18 +02:00
parent d953e39e63
commit 8da040342e
12 changed files with 296 additions and 129 deletions

View File

@@ -317,7 +317,6 @@ THE END.`, refShortcode)),
// Issue #939
// Issue #1923
func TestShouldAlwaysHaveUglyURLs(t *testing.T) {
hugofs.InitMemFs()
for _, uglyURLs := range []bool{true, false} {
doTestShouldAlwaysHaveUglyURLs(t, uglyURLs)
}
@@ -383,12 +382,7 @@ func doTestShouldAlwaysHaveUglyURLs(t *testing.T, uglyURLs bool) {
}
for _, test := range tests {
file, err := hugofs.Destination().Open(test.doc)
if err != nil {
t.Fatalf("Did not find %s in target: %s", test.doc, err)
}
content := helpers.ReaderToString(file)
content := readDestination(t, test.doc)
if content != test.expected {
t.Errorf("%s content expected:\n%q\ngot:\n%q", test.doc, test.expected, content)