Hi All
I''m trying to submit a from in an Integration test.
I have the following form:
<form action="/auth/login" method="post" ......>
...
<input ... name="params[field1]" type="text" ....>
...
</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:in
`process''
/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:in
`send''
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/integration.rb:498:in
`post''
integration/auth_test.rb:15:in `test_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
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
I just changed
post: :login, :params => { :field1 => ''blabla'', :field2
=> ''blalba'' }
into
post: "/login", :params => { :field1 =>
''blabla'', :field2 => ''blalba'' }
and the error was gone :)
Interesting!
cheers
LuCa
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---