"""Pre-split regression tests for feed, stats, and wheel routes."""
from __future__ import annotations

from fastapi.testclient import TestClient


class TestFeed:
    def test_unauthenticated_returns_401(self, client: TestClient):
        assert client.get("/api/feed").status_code == 401

    def test_authenticated_returns_activities(self, user_client: TestClient):
        r = user_client.get("/api/feed")
        assert r.status_code == 200
        assert "activities" in r.json()


class TestStats:
    def test_public_returns_200(self, client: TestClient):
        r = client.get("/api/stats")
        assert r.status_code == 200
        assert "user_count" in r.json()


class TestWheelVersion:
    def test_public_returns_version(self, client: TestClient):
        r = client.get("/api/wheel/version")
        assert r.status_code == 200
        assert "version" in r.json()
