質問

In my application, I need a functionality where one request fetches a token(random string) from the server which is stored in the session and the second request is made with this token.

When I make the requests in my tests using ring-mock, the second request says the token is not in session. I assume both requests are independent in test scenario.

How do I maintain a session when issuing multiple requests using ring-mock for writing tests? Or is there any other library that I can use for tests in such cases?

役に立ちましたか?

解決

As per the suggestion by James Reeves through twitter, I was able to solve this problem by using peridot. It has session handling for writing tests.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top