Skip to content

Instantly share code, notes, and snippets.

View paulstatezny's full-sized avatar

Paul Statezny paulstatezny

View GitHub Profile
@tsubery
tsubery / phoenix_session_test.md
Last active August 8, 2024 14:11
How to set session in phoenix controller tests

If you are reading this, you probably tried to write code like this

test "testing session" do
  build_conn()
  |> put_session(:user_id, 234)
  |> get("/")
  ...
  end

And got this exception: