This project is archived and is in readonly mode.

#702 ✓stale
Raul Murciano

ArgumentError on xhr integration tests

Reported by Raul Murciano | July 25th, 2008 @ 12:39 PM | in 2.x

When making a xhr :post call from integration tests I always get an ArgumentError:

ArgumentError: wrong number of arguments (4 for 3)

.../vendor/rails/actionpack/lib/action_controller/integration.rb:450:in `post'

.../vendor/rails/actionpack/lib/action_controller/integration.rb:450:in `send!'

.../vendor/rails/actionpack/lib/action_controller/integration.rb:450:in `post'

.../vendor/rails/actionpack/lib/action_controller/test_process.rb:400:in `send!'

.../vendor/rails/actionpack/lib/action_controller/test_process.rb:400:in `xhr'

It seems that when xml_http_request calls:

send!(request_method, action, parameters, session, flash)

the final flash argument differs from the integration session's post method signature:

def post(path, parameters = nil, headers = nil)

I can't see any reference to flash variables on integration stuff so maybe just removing the flash parameter will do the job.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages