we tried a variety of methods and all of them yielded different kinds of errors, which luckily I don't remember now. We were able to use bypass_through
and friends until the recent time when we need a session for real.
That's what I was able to put together basing on Plug
tests:
def conn_with_session do
build_conn
|> get("/")
|> recycle
|> Plug.Session.call(Plug.Session.init(store: Plug.ProcessStore, key: "_app_key"))
|> fetch_session
end
where Plug.ProcessStore
is copy-pasted from here https://github.com/elixir-lang/plug/blob/master/test/test_helper.exs#L6
Is there a more convenient/straightforward method to do that?