Skip to content

Comments

change endpoint config into setup block style#299

Open
slapers wants to merge 2 commits intogermsvel:mainfrom
slapers:feat/endpoint-config
Open

change endpoint config into setup block style#299
slapers wants to merge 2 commits intogermsvel:mainfrom
slapers:feat/endpoint-config

Conversation

@slapers
Copy link
Contributor

@slapers slapers commented Feb 20, 2026

Hi,

I hope you don't mind me just opening a PR without any discussions on this. But this PR gives another option of handling the @endpoint config.

I think this PR is very close to the #231 but I decided to put the phoenix_endpoint in the conn private assigns, this way It can be configured in the setup block.

In the PR I removed the config entirely, but its trivial to add it again to keep it backwards compatible.

 setup tags do
    MyApp.DataCase.setup_sandbox(tags)
    {:ok, conn: Phoenix.ConnTest.build_conn() |> PhoenixTest.put_endpoint(MyAppWeb.Endpoint)}
 end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant