Fixed DSL test

dev
Ice3man543 2021-11-05 17:04:42 +05:30
parent 0a09b9e451
commit 1c360e0344
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ func TestDSLURLEncodeDecode(t *testing.T) {
}
func TestDSLTimeComparison(t *testing.T) {
compiled, err := govaluate.NewEvaluableExpressionWithFunctions("time_now() > not_after", HelperFunctions())
compiled, err := govaluate.NewEvaluableExpressionWithFunctions("unixtime() > not_after", HelperFunctions())
require.Nil(t, err, "could not compare time")
result, err := compiled.Evaluate(map[string]interface{}{"not_after": float64(time.Now().Unix() - 1000)})