문제

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