Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cybrox/d22c7443e25a39dbe154af746a3ab8d6 to your computer and use it in GitHub Desktop.
Save cybrox/d22c7443e25a39dbe154af746a3ab8d6 to your computer and use it in GitHub Desktop.
testing-protected-phoenix-controllers-4.ex
test "accessing a protected route" do
user = insert(:user, [username: "Sven"])
conn = conn |> get(user_path(conn, :show, "self") <> with_user(user))
# assert results
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment