1
0

fix(views): test assertions

This commit is contained in:
kolaente
2024-03-18 23:09:17 +01:00
parent 9075a45cb8
commit 409f9a0cc6
5 changed files with 102 additions and 103 deletions

View File

@ -53,8 +53,25 @@ func TestProject_CreateOrUpdate(t *testing.T) {
"description": project.Description,
"parent_project_id": 0,
}, false)
db.AssertExists(t, "buckets", map[string]interface{}{
db.AssertExists(t, "project_views", map[string]interface{}{
"project_id": project.ID,
"view_kind": ProjectViewKindList,
}, false)
db.AssertExists(t, "project_views", map[string]interface{}{
"project_id": project.ID,
"view_kind": ProjectViewKindGantt,
}, false)
db.AssertExists(t, "project_views", map[string]interface{}{
"project_id": project.ID,
"view_kind": ProjectViewKindTable,
}, false)
db.AssertExists(t, "project_views", map[string]interface{}{
"project_id": project.ID,
"view_kind": ProjectViewKindKanban,
"bucket_configuration_mode": BucketConfigurationModeManual,
}, false)
db.AssertExists(t, "buckets", map[string]interface{}{
"project_view_id": project.ID * 4, // FIXME: Dirty hack to get the project view id
}, false)
})
t.Run("nonexistant parent project", func(t *testing.T) {