Skip to content

Commit

Permalink
Fix date test
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Aug 17, 2023
1 parent cb6c8ca commit 931dbf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/time/time_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ func TestTime(t *testing.T) {

func TestTime_duration(t *testing.T) {
env := map[string]interface{}{
"date": time.Date(2000, time.Month(1), 1, 0, 0, 0, 0, time.UTC),
"foo": time.Date(2000, time.Month(1), 1, 0, 0, 0, 0, time.UTC),
}
program, err := expr.Compile(`now() - duration("1h") < now() && date + duration("24h") < now()`, expr.Env(env))
program, err := expr.Compile(`now() - duration("1h") < now() && foo + duration("24h") < now()`, expr.Env(env))
require.NoError(t, err)

output, err := expr.Run(program, env)
Expand Down

0 comments on commit 931dbf3

Please sign in to comment.