livebook/test/support/conn_case.ex

22 lines
449 B
Elixir
Raw Normal View History

defmodule LivebookWeb.ConnCase do
2021-01-08 03:55:45 +08:00
use ExUnit.CaseTemplate
using do
quote do
# Import conveniences for testing with connections
import Plug.Conn
import Phoenix.ConnTest
import LivebookWeb.ConnCase
2021-01-08 03:55:45 +08:00
alias LivebookWeb.Router.Helpers, as: Routes
2021-01-08 03:55:45 +08:00
# The default endpoint for testing
@endpoint LivebookWeb.Endpoint
2021-01-08 03:55:45 +08:00
end
end
setup _tags do
{:ok, conn: Phoenix.ConnTest.build_conn()}
end
end