Forum: Ruby on Rails assert_redirected_to

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Raymond O. (Guest)
on 2007-01-18 20:53
I have an index action in one controller.  This action redirects you to
an account_options action (in another controller) if a session var is
set or it redirects the user to login (which is also in a diff
controller from the index action).  I get strange behavior when testing
this action.  The login redirect only seems to work if I use the
following as strings (which I believe is the correct way):
assert_redirected_to :controller => 'accounts', :action => 'login'
Yet, testing the redirect to account_options only passes when I put the
controller and action as symbols. Such as:
assert_redirected_to :controller => :accounts, :action =>

Any idea why this occurs?
This topic is locked and can not be replied to.