Skip to content

Instantly share code, notes, and snippets.

View devnacho's full-sized avatar

Ignacio Gutierrez devnacho

View GitHub Profile
@devnacho
devnacho / phoenix_session_test.md
Created May 17, 2022 21:50 — forked from tsubery/phoenix_session_test.md
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: