mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 03:05:26 +00:00
Fixed DSL test
This commit is contained in:
parent
0a09b9e451
commit
1c360e0344
@ -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)})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user