prop/test/microwaveprop_web/live/api_docs_live_test.exs
Graham McIntire c56b55d5af
feat: serve API docs at /docs/api
- /docs/api → LiveView rendering README.md as HTML
- /docs/api/openapi.yaml → raw OpenAPI 3.1 spec
- /docs/api/README.md → raw markdown source
2026-05-09 09:09:45 -05:00

13 lines
363 B
Elixir

defmodule MicrowavepropWeb.ApiDocsLiveTest do
use MicrowavepropWeb.ConnCase, async: true
import Phoenix.LiveViewTest
test "renders the API reference at /docs/api", %{conn: conn} do
{:ok, _view, html} = live(conn, ~p"/docs/api")
assert html =~ "Microwaveprop REST API"
assert html =~ "/api/v1"
assert html =~ "POST /auth/tokens"
end
end