Functional test problem in rails 2.2.2

Hi,

I am doing functional test for my application, when i created a method
in test folder

test “valid_login_and_redirect” do
post :authenticate,:user=> {:username=>‘admin’,:password=>‘admin’}
assert session[:user]
assert_response :redirect
end

i am getting the error as
valid_login_and_redirect(AccountControllerTest)
[functional/account_controller_test.rb:16:in
test_valid_login_and_redirect' /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb:60:insend
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb:60:in
`run’]:

is not true.

Please help me

Hi Nike M.

session[:user] is nil

Sijo

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs