Skip to content

Commit

Permalink
fix test. Set current day one month in advance (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
tjex authored Nov 19, 2024
1 parent 4020961 commit b3d88df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/adapter/handlebars/handlebars_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ func TestFormatDateHelper(t *testing.T) {

func TestFormatDateHelperElapsedYear(t *testing.T) {
year := time.Now().UTC().Year() - 14
context := map[string]interface{}{"now": time.Date(year, 11, 17, 20, 34, 58, 651387237, time.UTC)}
month := time.Now().UTC().Month() + 1
day := time.Now().UTC().Day()
context := map[string]interface{}{"now": time.Date(year, month, day, 20, 34, 58, 651387237, time.UTC)}
testString(t, "{{format-date now 'elapsed'}}", context, "14 years ago")
}

Expand Down

0 comments on commit b3d88df

Please sign in to comment.