Add Styler
This commit is contained in:
@@ -19,15 +19,14 @@ defmodule TradexWeb.ConnCase do
|
||||
|
||||
using do
|
||||
quote do
|
||||
use TradexWeb, :verified_routes
|
||||
import Phoenix.ConnTest
|
||||
import Plug.Conn
|
||||
import TradexWeb.ConnCase
|
||||
# The default endpoint for testing
|
||||
@endpoint TradexWeb.Endpoint
|
||||
|
||||
use TradexWeb, :verified_routes
|
||||
|
||||
# Import conveniences for testing with connections
|
||||
import Plug.Conn
|
||||
import Phoenix.ConnTest
|
||||
import TradexWeb.ConnCase
|
||||
end
|
||||
end
|
||||
|
||||
|
@@ -16,14 +16,16 @@ defmodule Tradex.DataCase do
|
||||
|
||||
use ExUnit.CaseTemplate
|
||||
|
||||
alias Ecto.Adapters.SQL.Sandbox
|
||||
|
||||
using do
|
||||
quote do
|
||||
alias Tradex.Repo
|
||||
|
||||
import Ecto
|
||||
import Ecto.Changeset
|
||||
import Ecto.Query
|
||||
import Tradex.DataCase
|
||||
|
||||
alias Tradex.Repo
|
||||
end
|
||||
end
|
||||
|
||||
@@ -36,8 +38,8 @@ defmodule Tradex.DataCase do
|
||||
Sets up the sandbox based on the test tags.
|
||||
"""
|
||||
def setup_sandbox(tags) do
|
||||
pid = Ecto.Adapters.SQL.Sandbox.start_owner!(Tradex.Repo, shared: not tags[:async])
|
||||
on_exit(fn -> Ecto.Adapters.SQL.Sandbox.stop_owner(pid) end)
|
||||
pid = Sandbox.start_owner!(Tradex.Repo, shared: not tags[:async])
|
||||
on_exit(fn -> Sandbox.stop_owner(pid) end)
|
||||
end
|
||||
|
||||
@doc """
|
||||
|
Reference in New Issue
Block a user