diff --git a/embed/post-list.html b/embed/post-list.html
index 232dd64..25f633b 100644
--- a/embed/post-list.html
+++ b/embed/post-list.html
@@ -1,3 +1,7 @@
+
{{range .}}
-
-{{end}}
\ No newline at end of file
+
+{{end}}
+
\ No newline at end of file
diff --git a/embed/post.html b/embed/post.html
index 19a2483..d6c1ffb 100644
--- a/embed/post.html
+++ b/embed/post.html
@@ -1,2 +1,6 @@
-{{.Title}}
-{{.Post}}
\ No newline at end of file
+
+
{{.Title}}
+
+ {{.Post}}
+
+
\ No newline at end of file
diff --git a/renderer_test.go b/renderer_test.go
index 407989f..d97f8e2 100644
--- a/renderer_test.go
+++ b/renderer_test.go
@@ -18,12 +18,28 @@ func TestCanRenderPost(t *testing.T) {
return
}
- if !strings.Contains(result, "testpost
") {
+ if !strings.Contains(result, "testpost
") {
t.Error("Post title not rendered as h1. Got: " + result)
}
}
+func TestRenderPostHEntry(t *testing.T) {
+ user := getTestUser()
+ post, _ := user.CreateNewPost("testpost")
+ result, _ := owl.RenderPost(post)
+ if !strings.Contains(result, "class=\"h-entry\"") {
+ t.Error("h-entry container not rendered. Got: " + result)
+ }
+ if !strings.Contains(result, "class=\"p-name\"") {
+ t.Error("p-name not rendered. Got: " + result)
+ }
+ if !strings.Contains(result, "class=\"e-content\"") {
+ t.Error("e-content not rendered. Got: " + result)
+ }
+
+}
+
func TestRendererUsesBaseTemplate(t *testing.T) {
user := getTestUser()
post, _ := user.CreateNewPost("testpost")
@@ -52,6 +68,30 @@ func TestCanRenderIndexPage(t *testing.T) {
}
}
+func TestIndexPageContainsHFeedContainer(t *testing.T) {
+ user := getTestUser()
+ user.CreateNewPost("testpost1")
+
+ result, _ := owl.RenderIndexPage(user)
+ if !strings.Contains(result, "") {
+ t.Error("h-feed container not rendered. Got: " + result)
+ }
+}
+
+func TestIndexPageContainsHEntryAndUUrl(t *testing.T) {
+ user := getTestUser()
+ user.CreateNewPost("testpost1")
+
+ result, _ := owl.RenderIndexPage(user)
+ if !strings.Contains(result, "class=\"h-entry\"") {
+ t.Error("h-entry container not rendered. Got: " + result)
+ }
+ if !strings.Contains(result, "class=\"u-url\"") {
+ t.Error("u-url not rendered. Got: " + result)
+ }
+
+}
+
func TestRenderIndexPageWithBrokenBaseTemplate(t *testing.T) {
user := getTestUser()
user.CreateNewPost("testpost1")