"""Basic API smoke tests."""
import pytest


@pytest.mark.asyncio
async def test_health_endpoint(client):
    resp = await client.get("/health")
    assert resp.status_code == 200


@pytest.mark.asyncio
async def test_settings_requires_auth(client):
    """Settings endpoint ohne Auth → 401/403."""
    resp = await client.get("/api/admin/settings")
    assert resp.status_code in (401, 403)


@pytest.mark.asyncio
async def test_admin_settings_with_auth(client, auth_headers):
    """Settings endpoint mit Admin-Token → 200."""
    resp = await client.get("/api/admin/settings", headers=auth_headers)
    assert resp.status_code == 200
    data = resp.json()
    assert "blender_engine" in data
    assert "thumbnail_format" in data
