Skip to content

Commit

Permalink
Add unit test for non-templated rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilkka Poutanen committed Aug 28, 2023
1 parent f801350 commit 9c99b12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/engine/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import (

func TestRender(t *testing.T) {
templates := map[string][]byte{
"templates/test1.tmpl": []byte("{{.var1 | title }} {{.var2 | title}}"),
"templates/test1.tmpl": []byte("{{.var1 | title}} {{.var2 | title}}"),
"templates/test2": []byte("{{.var1 | title}}"),
}

vals := map[string]interface{}{
Expand All @@ -23,6 +24,7 @@ func TestRender(t *testing.T) {

expect := map[string][]byte{
"templates/test1": []byte("First Second"),
"templates/test2": []byte("{{.var1 | title}}"),
}

for name := range expect {
Expand Down

0 comments on commit 9c99b12

Please sign in to comment.