Pedro Côrte-Real
2006-Jun-30 10:50 UTC
[Rails] Strange behaviour from assert_redirected_to
I have this assertion in my tests: assert_redirected_to :controller => ''user'', :action => ''change_password'' It fails with: response is not a redirection to all of the options supplied (redirection is <"http://test.host/user/change_password">), difference: <{:controller=>"user"}> The redirection was: redirect_to ''/user/change_password'' Anyone know why this happens? Greetings, Pedro.
Pedro, I''ve seen the same problem. Did you ever find an answer? Anyone in the community care to way in?> assert_redirected_to :controller => ''user'', :action => ''change_password'' > > It fails with: > > response is not a redirection to all of the options supplied
Pedro Côrte-Real
2006-Jul-02 14:29 UTC
[Rails] Re: Strange behaviour from assert_redirected_to
On 7/1/06, Brittain <sbrittain@kalivo.com> wrote:> Pedro, I''ve seen the same problem. Did you ever find an answer?No, not yet. I just commented out the test for now... Pedro.
Chris Carter
2006-Jul-02 14:38 UTC
[Rails] Re: Re: Strange behaviour from assert_redirected_to
Try doing redirect_to :controller => "user", :action => "change_password" maybe? -- Posted via http://www.ruby-forum.com/.
Pedro Côrte-Real
2006-Jul-03 09:40 UTC
[Rails] Re: Re: Strange behaviour from assert_redirected_to
On 7/2/06, Chris Carter <cdcarter@gmail.com> wrote:> Try doing redirect_to :controller => "user", :action => > "change_password" maybe?Yes, that works, but doesn''t do what I want. I''m saving request_uri in the session and then recalling it with redirect_to. It''s not a fixed redirect. Pedro.