small fixes
This commit is contained in:
parent
d961fb65e8
commit
50bb7ff078
|
@ -65,7 +65,7 @@ func RenderIndexPage(user User) (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var html bytes.Buffer
|
var html bytes.Buffer
|
||||||
t, err := template.New("post").Parse(baseTemplate)
|
t, err := template.New("index").Parse(baseTemplate)
|
||||||
|
|
||||||
t.Execute(&html, data)
|
t.Execute(&html, data)
|
||||||
|
|
||||||
|
|
|
@ -43,9 +43,9 @@ func TestCanRenderIndexPage(t *testing.T) {
|
||||||
user.CreateNewPost("testpost2")
|
user.CreateNewPost("testpost2")
|
||||||
result, _ := kiss.RenderIndexPage(user)
|
result, _ := kiss.RenderIndexPage(user)
|
||||||
if !strings.Contains(result, "testpost1") {
|
if !strings.Contains(result, "testpost1") {
|
||||||
t.Error("Post title not rendered as h1. Got: " + result)
|
t.Error("Post title not rendered. Got: " + result)
|
||||||
}
|
}
|
||||||
if !strings.Contains(result, "testpost2") {
|
if !strings.Contains(result, "testpost2") {
|
||||||
t.Error("Post title not rendered as h1. Got: " + result)
|
t.Error("Post title not rendered. Got: " + result)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue