Exemple #1
0
func TestCreateTplCtx(t *testing.T) {
	tplDir := "rootfs/templates"
	ctx := createTplCtx(tplDir, funcs)
	tpl, err := ctx.Prepare(tpl.NewFiles("index.html"))
	assert.NoErr(t, err)
	assert.NotNil(t, tpl, "returned template")
}
Exemple #2
0
func TestNil(t *testing.T) {
	assert.Nil(t, nil, "nil")
	assert.NotNil(t, "abc", "string")
}