Update manifest.json and infra README
- Updated timestamps and AST hashes in manifest.json for various backend and frontend files to reflect recent changes. - Added new files related to MCC categories and optional hold reasons in the manifest. - Modified the README in the infra directory to correct the linting tool from 'mypy' to 'ty' for type checking in the backend project.
This commit is contained in:
@@ -71,6 +71,53 @@ def test_space_has_protected_savings_pair(client: TestClient) -> None:
|
||||
assert delete_response.status_code == 409
|
||||
|
||||
|
||||
def test_categories_expose_and_update_multiple_mcc_codes(client: TestClient) -> None:
|
||||
csrf = bootstrap(client)
|
||||
definitions = client.get("/api/v1/budget/category-definitions").json()
|
||||
groceries = next(item for item in definitions if item["systemKey"] == "groceries")
|
||||
assert {5411, 5422}.issubset(groceries["mccCodes"])
|
||||
assert any(item["systemKey"] == "others" for item in definitions)
|
||||
|
||||
created = client.post(
|
||||
"/api/v1/budget/categories",
|
||||
headers={"X-CSRF-Token": csrf},
|
||||
json={"name": "Shops", "kind": "monthly", "mccCodes": [5999, 5994]},
|
||||
)
|
||||
assert created.status_code == 201, created.text
|
||||
assert created.json()["mccCodes"] == [5994, 5999]
|
||||
category_id = created.json()["id"]
|
||||
|
||||
updated = client.patch(
|
||||
f"/api/v1/budget/category-definitions/{category_id}",
|
||||
headers={"X-CSRF-Token": csrf},
|
||||
json={"mccCodes": [5999]},
|
||||
)
|
||||
assert updated.status_code == 200, updated.text
|
||||
assert updated.json()["mccCodes"] == [5999]
|
||||
|
||||
taken = client.patch(
|
||||
f"/api/v1/budget/category-definitions/{category_id}",
|
||||
headers={"X-CSRF-Token": csrf},
|
||||
json={"mccCodes": [5411]},
|
||||
)
|
||||
assert taken.status_code == 409
|
||||
assert taken.json()["error"]["code"] == "CATEGORY_MCC_TAKEN"
|
||||
|
||||
released = client.patch(
|
||||
f"/api/v1/budget/category-definitions/{groceries['id']}",
|
||||
headers={"X-CSRF-Token": csrf},
|
||||
json={"mccCodes": [code for code in groceries["mccCodes"] if code != 5411]},
|
||||
)
|
||||
assert released.status_code == 200, released.text
|
||||
remapped = client.patch(
|
||||
f"/api/v1/budget/category-definitions/{category_id}",
|
||||
headers={"X-CSRF-Token": csrf},
|
||||
json={"mccCodes": [5411, 5999]},
|
||||
)
|
||||
assert remapped.status_code == 200, remapped.text
|
||||
assert remapped.json()["mccCodes"] == [5411, 5999]
|
||||
|
||||
|
||||
def test_category_lifecycle_create_rename_archive_restore(client: TestClient) -> None:
|
||||
csrf = bootstrap(client)
|
||||
created = client.post(
|
||||
@@ -163,9 +210,7 @@ def test_adjust_and_savings_conversion_http_contracts(client: TestClient) -> Non
|
||||
"occurredOn": "2026-09-10",
|
||||
"reason": "Statement reconciliation",
|
||||
}
|
||||
denied = client.post(
|
||||
f"/api/v1/accounts/{account_id}/adjust-balance", json=adjustment_body
|
||||
)
|
||||
denied = client.post(f"/api/v1/accounts/{account_id}/adjust-balance", json=adjustment_body)
|
||||
assert denied.status_code == 403
|
||||
adjusted = client.post(
|
||||
f"/api/v1/accounts/{account_id}/adjust-balance",
|
||||
|
||||
Reference in New Issue
Block a user