Fix FastAPI index rendering

Use the current TemplateResponse signature and cover the live controls page.
This commit is contained in:
2026-07-29 14:48:48 +02:00
parent f4d151f9fe
commit a443909d64
2 changed files with 14 additions and 1 deletions
+13
View File
@@ -18,3 +18,16 @@ def test_status_contains_service_configuration(tmp_path, monkeypatch):
assert "movies_root" in payload
assert "tv_root" in payload
assert "auth_enabled" in payload
def test_index_renders_queue_controls(tmp_path, monkeypatch):
monkeypatch.setenv("IMPORTARR_STATE_PATH", str(tmp_path / "state.db"))
import importarr.main as main
from fastapi.testclient import TestClient
response = TestClient(main.app).get("/")
assert response.status_code == 200
assert "Queue controls" in response.text
assert "cancel-current" in response.text