feat: repeat tasks after completion
This commit is contained in:
+11
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user