init SlideLife
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
defmodule ModernBaseWeb.ConnCase do
|
||||
defmodule SlideLifeWeb.ConnCase do
|
||||
@moduledoc """
|
||||
This module defines the test case to be used by
|
||||
tests that require setting up a connection.
|
||||
@ -11,7 +11,7 @@ defmodule ModernBaseWeb.ConnCase do
|
||||
we enable the SQL sandbox, so changes done to the database
|
||||
are reverted at the end of every test. If you are using
|
||||
PostgreSQL, you can even run database tests asynchronously
|
||||
by setting `use ModernBaseWeb.ConnCase, async: true`, although
|
||||
by setting `use SlideLifeWeb.ConnCase, async: true`, although
|
||||
this option is not recommended for other databases.
|
||||
"""
|
||||
|
||||
@ -20,19 +20,19 @@ defmodule ModernBaseWeb.ConnCase do
|
||||
using do
|
||||
quote do
|
||||
# The default endpoint for testing
|
||||
@endpoint ModernBaseWeb.Endpoint
|
||||
@endpoint SlideLifeWeb.Endpoint
|
||||
|
||||
use ModernBaseWeb, :verified_routes
|
||||
use SlideLifeWeb, :verified_routes
|
||||
|
||||
# Import conveniences for testing with connections
|
||||
import Plug.Conn
|
||||
import Phoenix.ConnTest
|
||||
import ModernBaseWeb.ConnCase
|
||||
import SlideLifeWeb.ConnCase
|
||||
end
|
||||
end
|
||||
|
||||
setup tags do
|
||||
ModernBase.DataCase.setup_sandbox(tags)
|
||||
SlideLife.DataCase.setup_sandbox(tags)
|
||||
{:ok, conn: Phoenix.ConnTest.build_conn()}
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user