|
|
|
|
@ -91,6 +91,23 @@ def test_home_uses_brl_when_no_account_currency_exists(client, monkeypatch):
|
|
|
|
|
assert '<option value="BRL" selected>BRL</option>' in response.content.decode() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_monthly_report_rejects_month_without_representable_next_month(client): |
|
|
|
|
response = client.get( |
|
|
|
|
reverse("monthly-report"), |
|
|
|
|
{"month": "9999-12", "currency": "BRL"}, |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
assert response.status_code == 400 |
|
|
|
|
assert "invalid_month" in response.content.decode() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_reports_are_linked_from_non_dashboard_pages(client): |
|
|
|
|
response = client.get(reverse("transaction-list")) |
|
|
|
|
|
|
|
|
|
assert response.status_code == 200 |
|
|
|
|
assert f'href="{reverse("monthly-report")}">Reports</a>' in response.content.decode() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_negative_spending_and_balance_keep_their_sign_and_are_labeled(client): |
|
|
|
|
bank = make_account() |
|
|
|
|
post(bank, "-100.00", Transaction.Kind.OPENING, date(2025, 12, 31)) |
|
|
|
|
|