fix tests

This commit is contained in:
kolaente
2025-09-03 20:46:16 +02:00
parent 42d8c17551
commit 6797301075
4 changed files with 21 additions and 24 deletions

View File

@@ -55,6 +55,7 @@ func TestLabel_ReadAll(t *testing.T) {
Issuer: "local",
EmailRemindersEnabled: true,
OverdueTasksRemindersEnabled: true,
TodayTasksRemindersEnabled: true,
TodayTasksRemindersTime: "09:00",
Created: testCreatedTime,
Updated: testUpdatedTime,
@@ -187,6 +188,7 @@ func TestLabel_ReadOne(t *testing.T) {
Issuer: "local",
EmailRemindersEnabled: true,
OverdueTasksRemindersEnabled: true,
TodayTasksRemindersEnabled: true,
TodayTasksRemindersTime: "09:00",
Created: testCreatedTime,
Updated: testUpdatedTime,

View File

@@ -153,6 +153,7 @@ func TestProjectUser_ReadAll(t *testing.T) {
Issuer: "local",
EmailRemindersEnabled: true,
OverdueTasksRemindersEnabled: true,
TodayTasksRemindersEnabled: true,
TodayTasksRemindersTime: "09:00",
Created: testCreatedTime,
Updated: testUpdatedTime,

View File

@@ -43,6 +43,7 @@ func TestTaskCollection_ReadAll(t *testing.T) {
Issuer: "local",
EmailRemindersEnabled: true,
OverdueTasksRemindersEnabled: true,
TodayTasksRemindersEnabled: true,
TodayTasksRemindersTime: "09:00",
Created: testCreatedTime,
Updated: testUpdatedTime,
@@ -55,6 +56,7 @@ func TestTaskCollection_ReadAll(t *testing.T) {
Issuer: "local",
EmailRemindersEnabled: true,
OverdueTasksRemindersEnabled: true,
TodayTasksRemindersEnabled: false,
TodayTasksRemindersTime: "09:00",
DefaultProjectID: 4,
Created: testCreatedTime,
@@ -67,6 +69,7 @@ func TestTaskCollection_ReadAll(t *testing.T) {
Issuer: "local",
EmailRemindersEnabled: true,
OverdueTasksRemindersEnabled: true,
TodayTasksRemindersEnabled: false,
TodayTasksRemindersTime: "09:00",
Created: testCreatedTime,
Updated: testUpdatedTime,
@@ -658,30 +661,17 @@ func TestTaskCollection_ReadAll(t *testing.T) {
Updated: time.Unix(1543626724, 0).In(loc),
}
task47 := &Task{
ID: 47,
Title: "task #47 with reminders outside window",
Identifier: "test1-32",
Index: 32,
CreatedByID: 1,
CreatedBy: user1,
Reminders: []*TaskReminder{
{
ID: 6,
TaskID: 47,
Reminder: time.Date(2018, 8, 1, 12, 0, 0, 0, loc),
Created: time.Unix(1543626724, 0).In(loc),
},
{
ID: 7,
TaskID: 47,
Reminder: time.Date(2019, 3, 1, 12, 0, 0, 0, loc),
Created: time.Unix(1543626724, 0).In(loc),
},
},
ID: 47,
Title: "task #47 due today",
Identifier: "test1-13",
Index: 13,
CreatedByID: 1,
CreatedBy: user1,
ProjectID: 1,
DueDate: time.Date(2018, 12, 1, 23, 0, 0, 0, loc),
RelatedTasks: map[RelationKind][]*Task{},
Created: time.Unix(1543626724, 0).In(loc),
Updated: time.Unix(1543626724, 0).In(loc),
Created: time.Date(2018, 12, 1, 1, 12, 4, 0, loc),
Updated: time.Date(2018, 12, 1, 1, 12, 4, 0, loc),
}
type fields struct {
@@ -1042,7 +1032,7 @@ func TestTaskCollection_ReadAll(t *testing.T) {
task33, // has nil dates
task35, // has nil dates
task39, // has nil dates
task47, // has nil dates
task47,
},
wantErr: false,
},
@@ -1641,9 +1631,9 @@ func TestTaskCollection_ReadAll(t *testing.T) {
// The only tasks with a due date
task6,
task5,
task47,
task28,
// The other ones don't have a due date
task47,
task39,
task35,
task33,
@@ -1692,6 +1682,7 @@ func TestTaskCollection_ReadAll(t *testing.T) {
task7,
task6,
task5,
task47,
task28,
},
},
@@ -1707,6 +1698,7 @@ func TestTaskCollection_ReadAll(t *testing.T) {
},
want: []*Task{
task28,
task47,
task5,
task6,
task7,
@@ -1727,6 +1719,7 @@ func TestTaskCollection_ReadAll(t *testing.T) {
want: []*Task{
task6,
task5,
task47,
task28,
task7,
task8,

View File

@@ -32,6 +32,7 @@ func TestListUsersFromProject(t *testing.T) {
Issuer: "local",
EmailRemindersEnabled: true,
OverdueTasksRemindersEnabled: true,
TodayTasksRemindersEnabled: true,
TodayTasksRemindersTime: "09:00",
Created: testCreatedTime,
Updated: testUpdatedTime,