feat: repeat tasks after completion
ci / gitleaks (push) Successful in 7s
ci / docker (push) Successful in 3m31s

This commit is contained in:
2026-09-10 21:21:28 +08:00
parent 84592db098
commit 64b8525720
14 changed files with 849 additions and 114 deletions
+11 -2
View File
@@ -279,7 +279,12 @@ def test_batch_complete_and_move(client):
for i in range(2)
]
response = client.post(
"/api/v1/tasks/batch", json={"task_ids": ids, "completed": True, "list_id": other["id"]}
"/api/v1/tasks/batch", json={
"task_ids": ids,
"completed": True,
"list_id": other["id"],
"versions": {task_id: 1 for task_id in ids},
}
)
assert response.status_code == 200
assert response.json()["updated"] == 2
@@ -473,7 +478,11 @@ def test_batch_supports_due_date_and_soft_delete_atomically(client):
failed = client.post(
"/api/v1/tasks/batch",
json={"task_ids": [ids[0], "00000000-0000-0000-0000-000000000001"], "completed": True},
json={
"task_ids": [ids[0], "00000000-0000-0000-0000-000000000001"],
"completed": True,
"versions": {ids[0]: 1, "00000000-0000-0000-0000-000000000001": 1},
},
)
assert failed.status_code == 404
assert client.get(f"/api/v1/tasks/{ids[0]}").json()["completed"] is False