hubolib: Narrow a test assertion
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 27 Apr 2017 11:00:24 +0000 (13:00 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 27 Apr 2017 11:00:24 +0000 (13:00 +0200)
hugolib/page_paths_test.go

index 5f0fa35551a8ac40a72319d6630506b89b041197..1270ce712cadf0e93868de6f9e334317e6983066 100644 (file)
@@ -149,7 +149,7 @@ func TestPageTargetPath(t *testing.T) {
                                                expected := test.expected
 
                                                // 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 (!strings.HasPrefix(expected, "/index") || test.d.Addends != "") && test.d.URL == "" && isUgly {