i am trying to create a simple login test, but cannot get past the follow_redirect. it says: TypeError: can't convert Symbol into String when it meets the 'follow_redirect'. Does it have anything to do with the fact that we are using https for the login process? i simply want to assert that the user is able to log in, and gets redirected to some other controller based on the type of user, but cannot get past the first redirect.
In response to the comment asking for error, here is the relevant portion:
The code is:
19 def test_login
20 params = {:email => 'normaluser.com', :password => 'password'}
21 post :login, params
22 puts "#{@response.inspect}"
23 assert_response :redirect
24 #assert_redirected_to '/user/login?email=normaluser.com&password=password'
25 follow_redirect
26 assert_response :success
The error i get is :
TypeError: can't convert Symbol into String
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/test_process.rb:413:in `delete'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/test_process.rb:413:in `follow_redirect_without_deprecation'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/deprecation.rb:94:in `send'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/deprecation.rb:94:in `follow_redirect'
user_controller_test.rb:25:in `test_login'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/testing/setup_and_teardown.rb:33:in `__send__'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/testing/setup_and_teardown.rb:33:in `run'