Hallo -- I have an assertion in a functional test that looks like this:
Code:
assert_redirected_to :controller=>'properties',:action=>'list'
This creates this error:
Code:
response is not a redirection to all of the options supplied (redirection is <"http://test.host/properties/list">)
This is due, I believe (tell me if I'm wrong!), to the fact that the code that generates the url uses:
Code:
url=url_for(:controller=>'properties',:action=>'list')
# more code here...
redirect_to(url)
However, when I try to rewrite my assertion to use the url_for() function like so:
Code:
assert_redirected_to(url_for(:controller=>'properties',:action=>'list'))
I get a NoMethodError for url_for().
Can anyone help here?
Cheers,
doug.