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 test "renders bulleted lists rather than literal asterisks", %{conn: conn} do {:ok, _view, html} = live(conn, ~p"/docs/api") assert html =~ "
\*\s+Base URL/ end test "applies the .api-docs class so the page has a sane reading width", %{conn: conn} do {:ok, _view, html} = live(conn, ~p"/docs/api") assert html =~ ~s(class="markdown-content api-docs") end end