Refactor conn aliasing in controller tests to use pipe chains

Applied refactor_conn_aliasing.sh to eliminate conn shadowing.

Show draft posts in test and dev
This commit is contained in:
Willem van den Ende
2026-03-20 21:36:08 +00:00
parent c18f9cd2e3
commit 9426582abc
7 changed files with 74 additions and 52 deletions
+2 -2
View File
@@ -38,8 +38,8 @@ defmodule Firehose.DataCase do
Sets up the sandbox based on the test tags.
"""
def setup_sandbox(tags) do
pid = Ecto.Adapters.SQL.Sandbox.start_owner!(Firehose.Repo, shared: not tags[:async])
on_exit(fn -> Ecto.Adapters.SQL.Sandbox.stop_owner(pid) end)
pid = Sandbox.start_owner!(Firehose.Repo, shared: not tags[:async])
on_exit(fn -> Sandbox.stop_owner(pid) end)
end
@doc """