mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
hubolib: Narrow a test assertion
This commit is contained in:
@@ -149,7 +149,7 @@ func TestPageTargetPath(t *testing.T) {
|
|||||||
expected := test.expected
|
expected := test.expected
|
||||||
|
|
||||||
// TODO(bep) simplify
|
// TODO(bep) simplify
|
||||||
if test.d.BaseName == test.d.Type.BaseName {
|
if test.d.Kind == KindPage && test.d.BaseName == test.d.Type.BaseName {
|
||||||
|
|
||||||
} else if test.d.Kind == KindHome && test.d.Type.Path != "" {
|
} else if test.d.Kind == KindHome && test.d.Type.Path != "" {
|
||||||
} else if (!strings.HasPrefix(expected, "/index") || test.d.Addends != "") && test.d.URL == "" && isUgly {
|
} else if (!strings.HasPrefix(expected, "/index") || test.d.Addends != "") && test.d.URL == "" && isUgly {
|
||||||
|
Reference in New Issue
Block a user