Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
thessem committed Jul 21, 2017
1 parent 8ee8cef commit 3d99b41
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions expressions/expressions_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package expressions

import (
"errors"
"fmt"
"strings"
"testing"
Expand Down Expand Up @@ -134,6 +135,10 @@ func TestEvaluateString(t *testing.T) {

_, err = EvaluateString("1 | undefined_filter", ctx)
require.Error(t, err)

cfg.AddFilter("error", func(input interface{}) (string, error) { return "", errors.New("test error") })
_, err = EvaluateString("1 | error", ctx)
require.Error(t, err)
}

func TestClosure(t *testing.T) {
Expand Down

0 comments on commit 3d99b41

Please sign in to comment.