package owl_test import ( "h4kor/owl-blogs" "os" "path" "strings" "testing" ) func TestCanRenderPost(t *testing.T) { user := getTestUser() post, _ := user.CreateNewPost("testpost") result, err := owl.RenderPost(post) if err != nil { t.Error("Error rendering post: " + err.Error()) return } if !strings.Contains(result, "

testpost

") { t.Error("Post title not rendered as h1. Got: " + result) } } func TestRendererUsesBaseTemplate(t *testing.T) { user := getTestUser() post, _ := user.CreateNewPost("testpost") result, err := owl.RenderPost(post) if err != nil { t.Error("Error rendering post: " + err.Error()) return } if !strings.Contains(result, "