Hello all,
I posted this question on the Rails wiki middle of last week but
haven''t gotten any response, so figured I would try here.
Has anyone else run into trouble getting user_controller tests for
the salted hash login that were create by the generator working under
0.13.x?? I have followed some very helpful notes on http://
wiki.rubyonrails.com/rails/show/SaltedHashLoginGenerator, but still
have some functional test failures that I can''t seem to iron out.
I have three (seemingly) ActionMailer related issues and another that
is a DoubleRenderError I can''t iron out. Anyone else running into
any of these? Here are my test failures.
1) Failure:
test_change_password(UserControllerTest)
[./test/functional/user_controller_test.rb:175:in
`do_change_password''
./test/functional/user_controller_test.rb:200:in
`test_change_password'']:
<0> expected but was
<1>.
2) Error:
test_delete(UserControllerTest):
ActionController::DoubleRenderError: Render and/or redirect were
called multiple times in this action. Please note that you may only
call render OR redirect, and only once per action. Also note that
neither redirect nor render terminate execution of the action, so if
you want to exit an action after redirecting, you need to do
something like "redirect_to(...) and return". Finally, note that to
cause a before filter to halt execution of the rest of the filter
chain, the filter must return false, explicitly, so "render(...) and
return false".
/usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/
action_controller/base.rb:695:in `redirect_to''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/
action_controller/base.rb:706:in `redirect_to''
./test/functional/../../config/..//lib/user_system.rb:78:in
`redirect_back_or_default''
./test/functional/../../config/..//app/controllers/
user_controller.rb:157:in `delete''
./test/functional/../../config/..//app/controllers/
user_controller.rb:130:in `edit''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/
action_controller/base.rb:756:in `send''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/
action_controller/base.rb:756:in `perform_action_without_filters''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/
action_controller/filters.rb:295:in `perform_action_without_benchmark''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/
action_controller/benchmarking.rb:41:in `perform_action_without_rescue''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/
action_controller/benchmarking.rb:41:in `measure''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/
action_controller/benchmarking.rb:41:in `perform_action_without_rescue''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/
action_controller/rescue.rb:80:in `perform_action''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/
action_controller/base.rb:356:in `send''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/
action_controller/base.rb:356:in `process''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/
action_controller/test_process.rb:275:in `process''
(eval):3:in `post''
./test/functional/user_controller_test.rb:114:in `test_delete''
3) Failure:
test_forgot_password(UserControllerTest)
[./test/functional/user_controller_test.rb:236:in
`do_forgot_password''
./test/functional/user_controller_test.rb:271:in
`test_forgot_password'']:
<0> expected but was
<1>.
4) Failure:
test_signup(UserControllerTest)
[./test/functional/user_controller_test.rb:86:in `do_test_signup''
./test/functional/user_controller_test.rb:150:in `test_signup'']:
<0> expected but was
<1>.
Thanks in advance for any help.
-Eric