Skip to content

Instantly share code, notes, and snippets.

Avatar

Gal Tsubery tsubery

View GitHub Profile
@tsubery
tsubery / phoenix_session_test.md
Last active Sep 13, 2020
How to set session in phoenix controller tests
View phoenix_session_test.md

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:

You can’t perform that action at this time.