"""Smoke: new accounting integration list routes import + OpenAPI presence."""
from __future__ import annotations

from fastapi.routing import APIRoute

from app.main import app


def test_settlements_list_route_registered():
    paths = {r.path for r in app.routes if isinstance(r, APIRoute)}
    assert "/api/v1/ar-ap/settlements" in paths


def test_compliance_risks_list_route_registered():
    paths = {r.path for r in app.routes if isinstance(r, APIRoute)}
    assert "/api/v1/compliance/risks" in paths


def test_purchase_profiles_list_route_registered():
    paths = {r.path for r in app.routes if isinstance(r, APIRoute)}
    assert "/api/v1/purchase-inventory/posting-profiles" in paths


def test_ops_and_sales_accounting_present():
    paths = {r.path for r in app.routes if isinstance(r, APIRoute)}
    assert "/api/v1/ops/documents" in paths
    assert "/api/v1/sales-accounting/post" in paths
    assert "/api/v1/purchase-inventory/post/goods-receipt" in paths
