You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
asciinema.org/test/controllers/doc_controller_test.exs

23 lines
597 B
Elixir

defmodule Asciinema.DocControllerTest do
use Asciinema.ConnCase
test "GET /docs", %{conn: conn} do
conn = get conn, "/docs"
assert redirected_to(conn, 302) == "/docs/getting-started"
end
test "GET /docs/*", %{conn: conn} do
Enum.each(["/docs/how-it-works",
"/docs/getting-started",
"/docs/installation",
"/docs/usage",
"/docs/config",
"/docs/embedding",
"/docs/faq"], fn(path) ->
conn = get conn, path
assert html_response(conn, 200) =~ "<h2>Docs</h2>"
end)
end
end