Forum: Rails Engines tests failing

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Britton Nielsen (Guest)
on 2006-01-13 17:17
I have the login controller and engines (1.0.4) setup and configured.  I
get the following errors when running the user_controller functional
tests.  Any help would be appreciated.

-Britton

C:\rails\test_user_engine>ruby
vendor\plugins\login_engine\test\functional\user_
controller_test.rb
Loaded suite
vendor/plugins/login_engine/test/functional/user_controller_test
Started
.....E..F.F........
Finished in 4.016 seconds.

  1) Error:
test_delete(UserControllerTest):
NoMethodError: You have a nil object when you didn't expect it!
The error occured while evaluating nil.deleted=
    C:/rails/test_user_engine/vendor/plugins/login_engine/app/controllers/user_c
ontroller.rb:206:in `restore_deleted'
    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.
rb:853:in `send'
    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.
rb:853:in `perform_action_without_filters'
    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/filte
rs.rb:332:in `perform_action_without_benchmark'
    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/bench
marking.rb:69:in `perform_action_without_rescue'
    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/bench
marking.rb:69:in `measure'
    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/bench
marking.rb:69:in `perform_action_without_rescue'
    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/rescu
e.rb:82:in `perform_action'
    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.
rb:369:in `send'
    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.
rb:369:in `process_without_session_management_support'
    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/sessi
on_management.rb:116:in `process_without_test'
    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/test_
process.rb:16:in `process'
    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/test_
process.rb:300:in `process'
    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/test_
process.rb:307:in `post'
    vendor/plugins/login_engine/test/functional/user_controller_test.rb:255:in
`
test_delete'

  2) Failure:
test_forgot_password(UserControllerTest)
    [c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/depr
ecated_assertions.rb:23:in `assert_session_has'
     vendor/plugins/login_engine/test/functional/user_controller_test.rb:461:in
`do_forgot_password'
     vendor/plugins/login_engine/test/functional/user_controller_test.rb:431:in
`test_forgot_password']:
<:user> is not in the session <#<ActionController::TestSession:0x37d70c0
 @attributes=
  {"return-to"=>"/bogus/location",
   "flash"=>
    {:warning=>"Password could not be changed at this time. Please
retry."}}>>

  3) Failure:
test_home_without_login(UserControllerTest)
[vendor/plugins/login_engine/test/fu
nctional/user_controller_test.rb:33]:
Expected response to be a <:redirect>, but was <200>

19 tests, 122 assertions, 2 failures, 1 errors
This topic is locked and can not be replied to.