This commit is contained in:
@@ -29,6 +29,22 @@ def test_bootstrap_returns_navigation_and_current_user(client):
|
||||
|
||||
|
||||
|
||||
def test_custom_recurrence_rejects_invalid_weekdays_month_days_and_until(client):
|
||||
inbox = boot(client)
|
||||
task = client.post(
|
||||
"/api/v1/tasks",
|
||||
json={"title": "自定义重复", "list_id": inbox["id"], "due_at": "2026-09-07T09:00:00Z"},
|
||||
).json()
|
||||
for rrule in (
|
||||
"FREQ=WEEKLY;BYDAY=XX",
|
||||
"FREQ=MONTHLY;BYMONTHDAY=0,32",
|
||||
"FREQ=DAILY;UNTIL=not-a-date",
|
||||
"FREQ=DAILY;UNKNOWN=1",
|
||||
):
|
||||
response = client.post("/api/v1/recurrences", json={"task_id": task["id"], "rrule": rrule})
|
||||
assert response.status_code == 422
|
||||
|
||||
|
||||
def test_get_recurrence_by_task_returns_rule_or_null(client):
|
||||
inbox = boot(client)
|
||||
task = client.post(
|
||||
|
||||
Reference in New Issue
Block a user