Login fails when using webrat
I am using restful_authentication 1.1.6 on rails 2.3.5 and testing with webrat 0.7.1 The login works fine when I use a browser to test it. When I use webrat, it first correctly logs in and sets the current_user and session[:user_id]. Then, when performing the redirect at the end of the action (:controller => session, :action => create), it sets the session[:user_id] and current_user to nil! This happens only when there is a redirect at the end. If there is a “render :text”, then the values of session[:user_id] and current_user will not be erased开发者_如何学Python! Any ideas, how I can fix this?
It turned out I froze wrong version of rails (2.3.8). Everything works fine after I froze version 2.3.5.
精彩评论