hspec-wai
hspec-wai copied to clipboard
Testing with session
Hi @sol, When I try to test an API actually needs the session, it will fail since the mock server can not reach the in-memory session. For instance, when testing with this test case, it will produce the error message:

Which is defined here, and it proves that the mock app can not reach out to the session when testing it, but it works fine when I start the server and test the API by hand.
Any ideas to fix this? Thanks in advance!
Where is the session stored? Cookies?
@sol yes, exactly.
Hi @sol, I can solve this by pass around the cookie explicitly like this.