WIP micropub #28
|
@ -2,7 +2,9 @@
|
|||
{{range .}}
|
||||
<div class="h-entry">
|
||||
<hgroup>
|
||||
<h3><a class="u-url" href="{{.UrlPath}}">{{.Title}}</a></h3>
|
||||
<h3><a class="u-url" href="{{.UrlPath}}">
|
||||
{{ if .Title }}{{.Title}}{{ else }}Note: {{.Id}}{{ end }}
|
||||
</a></h3>
|
||||
<small>
|
||||
Published:
|
||||
<time class="dt-published" datetime="{{.Meta.Date}}">
|
||||
|
|
|
@ -86,6 +86,14 @@ func TestCanRenderIndexPage(t *testing.T) {
|
|||
assertions.AssertContains(t, result, "testpost2")
|
||||
}
|
||||
|
||||
func TestCanRenderIndexPageNoTitle(t *testing.T) {
|
||||
user := getTestUser()
|
||||
post, _ := user.CreateNewPostFull(owl.PostMeta{}, "hi")
|
||||
result, _ := owl.RenderIndexPage(user)
|
||||
assertions.AssertContains(t, result, post.Id())
|
||||
assertions.AssertContains(t, result, "Note: ")
|
||||
}
|
||||
|
||||
func TestIndexPageContainsHFeedContainer(t *testing.T) {
|
||||
user := getTestUser()
|
||||
user.CreateNewPost("testpost1", false)
|
||||
|
|
Loading…
Reference in New Issue