开发者

Login fails when using webrat

开发者 https://www.devze.com 2023-01-25 04:34 出处:网络
I am using restful_authentication 1.1.6on 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 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消