Skip to content

Instantly share code, notes, and snippets.

@tlarevo
Last active April 10, 2024 14:58
Show Gist options
  • Save tlarevo/c12e144b2713e346c90b5662161d4c31 to your computer and use it in GitHub Desktop.
Save tlarevo/c12e144b2713e346c90b5662161d4c31 to your computer and use it in GitHub Desktop.
create and login separate user for scenario testing
defp register_and_log_user() do
# Create a user and register user
partner_user = user_fixture()
# Log in the user
conn = log_in_user(Phoenix.ConnTest.build_conn(), partner_user)
[partner_conn: conn, partner_user: partner_user]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment