fix: align total costs with visible budgets
This commit is contained in:
@@ -72,6 +72,33 @@ def test_admin_can_access_admin_route(logged_in_client):
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
def test_admin_route_shows_inactive_cleanup_section(logged_in_client, app):
|
||||
entry = Entry.query.filter_by(name="Lebensmittel").first()
|
||||
entry.is_active = False
|
||||
db.session.commit()
|
||||
|
||||
response = logged_in_client.get("/admin/")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert "Inaktive Elemente" in response.get_data(as_text=True)
|
||||
assert "Endgültig löschen" in response.get_data(as_text=True)
|
||||
|
||||
|
||||
def test_admin_can_hard_delete_inactive_entry(logged_in_client, app):
|
||||
entry = Entry.query.filter_by(name="Lebensmittel").first()
|
||||
entry.is_active = False
|
||||
entry_id = entry.id
|
||||
db.session.commit()
|
||||
|
||||
response = logged_in_client.post(
|
||||
f"/admin/entries/{entry_id}/delete",
|
||||
follow_redirects=True,
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
assert Entry.query.get(entry_id) is None
|
||||
|
||||
|
||||
def test_admin_can_create_entry_and_backfill_existing_month(logged_in_client, app):
|
||||
from app.models import Category, Entry, Month, MonthlyEntryValue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user