1
0

fix(task): remove task relation in the other direction as well

Resolves https://community.vikunja.io/t/removing-parent-relationship-doesnt-remove-the-subtask-relationship/1492/3
This commit is contained in:
kolaente
2023-09-01 16:12:20 +02:00
parent e518fb1191
commit 769b4f8d66
2 changed files with 40 additions and 31 deletions

View File

@ -118,6 +118,11 @@ func TestTaskRelation_Delete(t *testing.T) {
"other_task_id": 29,
"relation_kind": RelationKindSubtask,
})
db.AssertMissing(t, "task_relations", map[string]interface{}{
"task_id": 29,
"other_task_id": 1,
"relation_kind": RelationKindParenttask,
})
})
t.Run("Not existing", func(t *testing.T) {
db.LoadAndAssertFixtures(t)