Integration test post: problem

Hi All

I’m trying to submit a from in an Integration test.

I have the following form:

... ...

The test:

post: :login, :params => { :field1 => 'blabla', :field2 => 'blalba'

}

Running the test the line above generates the following error:

  1. Error:
    test_form_submit(AuthTest):
    NoMethodError: undefined method []' for :login:Symbol /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/integration.rb:222:inprocess’
    /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/integration.rb:157:in
    post' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/integration.rb:498:insend’
    /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/integration.rb:498:in
    post' integration/auth_test.rb:15:intest_login’
    /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/integration.rb:453:in
    `run’

Any suggestion what is wrong with the post: ?

Thnx in advance
LuCa

I just changed

post: :login, :params => { :field1 => ‘blabla’, :field2 => ‘blalba’ }

into

post: “/login”, :params => { :field1 => ‘blabla’, :field2 => ‘blalba’ }

and the error was gone :slight_smile:
Interesting!

cheers
LuCa