Session passed in integration tests in Rails 2.3.10

In Rails 2.3.8, my integration tests (after much work and help with this post ) were able to use one session between requests. In Rails 2.3.10, this feature broke down, and after logging in, subsequent requests have no session.

One possible symptom is that this bit of code is used to convey:

open_session do |s|
 s.post 'login', :user=>{:user_name=>username, :password=>pass}
 assert_not_nil(s.session[:id])
end

And now it fails (s.session [: id] - nil). This may or may not be a problem, as I can confirm that there are other variables stored in the session during the login action. However, on subsequent pages of s.post, all actions report that there is nothing in the session.

Any tips? I saw one report that Rails 2.3.9 introduced a session error with this as a workaround, but that doesn't seem to matter.

Thanks Tom

+3
source share
1 answer

Have you tried s.session.data[:id]

0
source

Source: https://habr.com/ru/post/1782292/


All Articles