Add Styler

This commit is contained in:
2025-01-27 14:44:09 +01:00
parent c5b01954d7
commit df1b84d5f4
34 changed files with 198 additions and 193 deletions

View File

@@ -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

View File

@@ -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 """