ash_admin/test/page_live_test.exs
2023-07-25 22:19:55 -04:00

25 lines
559 B
Elixir

defmodule AshAdmin.Test.PageLiveTest do
use ExUnit.Case, async: false
import Phoenix.ConnTest
import Phoenix.LiveViewTest
@endpoint AshAdmin.Test.Endpoint
setup do
%{conn: build_conn()}
end
test "it renders the schema by default", %{conn: conn} do
{:ok, _view, html} = live(conn, "/api/admin")
assert html =~ "Attributes"
assert html =~ "body"
assert html =~ "String"
{:ok, _view, html} = live(conn, "/api/admin/test")
assert html =~ "Attributes"
assert html =~ "body"
assert html =~ "String"
end
end