From 3568aaacee6d102ec8b749409cb1c8ca73c096f8 Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 5 Mar 2026 00:29:32 +0100 Subject: [PATCH] test: add task #48 to expected results in feature tests The new fixture task #48 (Landingpages update, project 1) needs to appear in all feature test expected result sets that list project 1 tasks. Also bumps the expected next index in TestTask_Create. --- pkg/models/task_collection_test.go | 26 ++++++++++++++++++++++++++ pkg/models/tasks_test.go | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/pkg/models/task_collection_test.go b/pkg/models/task_collection_test.go index 73423001d..70d9e833a 100644 --- a/pkg/models/task_collection_test.go +++ b/pkg/models/task_collection_test.go @@ -683,6 +683,19 @@ func TestTaskCollection_ReadAll(t *testing.T) { Created: time.Unix(1543626724, 0).In(loc), Updated: time.Unix(1543626724, 0).In(loc), } + task48 := &Task{ + ID: 48, + Title: "Landingpages update", + Description: "Update all landingpages with new branding", + Identifier: "test1-33", + Index: 33, + CreatedByID: 1, + CreatedBy: user1, + ProjectID: 1, + RelatedTasks: map[RelationKind][]*Task{}, + Created: time.Unix(1543626724, 0).In(loc), + Updated: time.Unix(1543626724, 0).In(loc), + } type fields struct { ProjectID int64 @@ -765,6 +778,7 @@ func TestTaskCollection_ReadAll(t *testing.T) { task35, task39, task47, + task48, }, wantErr: false, }, @@ -811,6 +825,7 @@ func TestTaskCollection_ReadAll(t *testing.T) { task35, task39, task47, + task48, }, wantErr: false, }, @@ -823,6 +838,7 @@ func TestTaskCollection_ReadAll(t *testing.T) { }, args: defaultArgs, want: []*Task{ + task48, task47, task35, task33, @@ -976,6 +992,7 @@ func TestTaskCollection_ReadAll(t *testing.T) { task33, task35, task47, + task48, }, wantErr: false, }, @@ -1043,6 +1060,7 @@ func TestTaskCollection_ReadAll(t *testing.T) { task35, // has nil dates task39, // has nil dates task47, // has nil dates + task48, // has nil dates }, wantErr: false, }, @@ -1216,6 +1234,7 @@ func TestTaskCollection_ReadAll(t *testing.T) { task35, task39, task47, + task48, }, wantErr: false, }, @@ -1311,6 +1330,7 @@ func TestTaskCollection_ReadAll(t *testing.T) { task35, task39, task47, + task48, }, wantErr: false, }, @@ -1388,6 +1408,7 @@ func TestTaskCollection_ReadAll(t *testing.T) { task35, task39, task47, + task48, }, wantErr: false, }, @@ -1433,6 +1454,7 @@ func TestTaskCollection_ReadAll(t *testing.T) { // task 35 has a label 5 and 4 task39, task47, + task48, }, wantErr: false, }, @@ -1478,6 +1500,7 @@ func TestTaskCollection_ReadAll(t *testing.T) { // task 35 has a label 5 and 4 task39, task47, + task48, }, wantErr: false, }, @@ -1535,6 +1558,7 @@ func TestTaskCollection_ReadAll(t *testing.T) { task33, task39, task47, + task48, }, wantErr: false, }, @@ -1626,6 +1650,7 @@ func TestTaskCollection_ReadAll(t *testing.T) { task31, task33, task47, + task48, }, }, { @@ -1643,6 +1668,7 @@ func TestTaskCollection_ReadAll(t *testing.T) { task5, task28, // The other ones don't have a due date + task48, task47, task39, task35, diff --git a/pkg/models/tasks_test.go b/pkg/models/tasks_test.go index abf4b88c0..445cfd8c3 100644 --- a/pkg/models/tasks_test.go +++ b/pkg/models/tasks_test.go @@ -54,7 +54,7 @@ func TestTask_Create(t *testing.T) { assert.NotEmpty(t, task.UID) // Assert getting a new index assert.NotEmpty(t, task.Index) - assert.Equal(t, int64(33), task.Index) + assert.Equal(t, int64(34), task.Index) err = s.Commit() require.NoError(t, err)