forums_controller_test.rb

Forums > Book - Chapter 5 > forums_controller_test.rb

Login to post a new topic

Author Message
juanpaco
Member since 16 Mar 19:15
0 posts

I was getting an error on line 38 of that file while running the tests as the book states on page 146. The offending line is written thus:
assert_redirected_to :controller => ‘topics’, :action => ‘index’, :forum_id => 1
I changed that line to
assert_redirected_to topics_path(:forum_id => ‘1’)
The test then runs. I found that odd because the assert_redirected_to could take a hash as far as I knew. Odd.