diff --git a/pkg/models/task_collection_filter_test.go b/pkg/models/task_collection_filter_test.go index 0e7d64eed..a495ec50c 100644 --- a/pkg/models/task_collection_filter_test.go +++ b/pkg/models/task_collection_filter_test.go @@ -17,8 +17,10 @@ package models import ( + "code.vikunja.io/api/pkg/db" "testing" "time" + "xorm.io/builder" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -261,6 +263,10 @@ func TestParseFilter(t *testing.T) { require.NoError(t, err) require.Len(t, result, 1) date := result[0].value.(time.Time) - assert.Equal(t, 1, date.Year()) + if db.GetDialect() == builder.MYSQL { + assert.Equal(t, 1, date.Year()) + } else { + assert.Equal(t, 0, date.Year()) + } }) }