<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer" nil="true"></assigned-user-id>
  <attachments-count type="integer">1</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2008-07-25T12:39:31+01:00</created-at>
  <creator-id type="integer">25412</creator-id>
  <milestone-due-on type="datetime" nil="true"></milestone-due-on>
  <milestone-id type="integer">9903</milestone-id>
  <number type="integer">702</number>
  <permalink>argumenterror-on-xhr-integration-tests</permalink>
  <priority type="integer">173</priority>
  <project-id type="integer">8994</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state>stale</state>
  <tag>2.1 actionpack bug tests</tag>
  <title>ArgumentError on xhr integration tests</title>
  <updated-at type="datetime">2008-10-28T16:33:20+00:00</updated-at>
  <user-id type="integer">424</user-id>
  <user-name>Joshua Peek</user-name>
  <creator-name>Raul Murciano</creator-name>
  <url>http://rails.lighthouseapp.com/projects/8994/tickets/702</url>
  <milestone-title>2.x</milestone-title>
  <original-body>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.</original-body>
  <latest-body>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.</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;
When making a xhr :post call from integration tests I always get an ArgumentError:
&lt;/p&gt;&lt;p&gt;
ArgumentError: wrong number of arguments (4 for 3)
&lt;/p&gt;&lt;p&gt;
.../vendor/rails/actionpack/lib/action_controller/integration.rb:450:in `post'
&lt;/p&gt;&lt;p&gt;
.../vendor/rails/actionpack/lib/action_controller/integration.rb:450:in `send!'
&lt;/p&gt;&lt;p&gt;
.../vendor/rails/actionpack/lib/action_controller/integration.rb:450:in `post'
&lt;/p&gt;&lt;p&gt;
.../vendor/rails/actionpack/lib/action_controller/test_process.rb:400:in `send!'
&lt;/p&gt;&lt;p&gt;
.../vendor/rails/actionpack/lib/action_controller/test_process.rb:400:in `xhr'
&lt;/p&gt;&lt;p&gt;
It seems that when xml_http_request calls:
&lt;/p&gt;&lt;p&gt;
send!(request_method, action, parameters, session, flash)
&lt;/p&gt;&lt;p&gt;
the final flash argument differs from the integration session's post method signature:
&lt;/p&gt;&lt;p&gt;
def post(path, parameters = nil, headers = nil)
&lt;/p&gt;&lt;p&gt;
I can't see any reference to flash variables on integration stuff so maybe just removing the flash parameter will do the job.
&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>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.</body>
      <body-html>&lt;div&gt;&lt;p&gt;
When making a xhr :post call from integration tests I always get an ArgumentError:
&lt;/p&gt;&lt;p&gt;
ArgumentError: wrong number of arguments (4 for 3)
&lt;/p&gt;&lt;p&gt;
.../vendor/rails/actionpack/lib/action_controller/integration.rb:450:in `post'
&lt;/p&gt;&lt;p&gt;
.../vendor/rails/actionpack/lib/action_controller/integration.rb:450:in `send!'
&lt;/p&gt;&lt;p&gt;
.../vendor/rails/actionpack/lib/action_controller/integration.rb:450:in `post'
&lt;/p&gt;&lt;p&gt;
.../vendor/rails/actionpack/lib/action_controller/test_process.rb:400:in `send!'
&lt;/p&gt;&lt;p&gt;
.../vendor/rails/actionpack/lib/action_controller/test_process.rb:400:in `xhr'
&lt;/p&gt;&lt;p&gt;
It seems that when xml_http_request calls:
&lt;/p&gt;&lt;p&gt;
send!(request_method, action, parameters, session, flash)
&lt;/p&gt;&lt;p&gt;
the final flash argument differs from the integration session's post method signature:
&lt;/p&gt;&lt;p&gt;
def post(path, parameters = nil, headers = nil)
&lt;/p&gt;&lt;p&gt;
I can't see any reference to flash variables on integration stuff so maybe just removing the flash parameter will do the job.
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-07-25T12:39:31+01:00</created-at>
      <creator-id type="integer">25412</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">702</number>
      <permalink>argumenterror-on-xhr-integration-tests</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>2.1 actionpack bug tests</tag>
      <title>ArgumentError on xhr integration tests</title>
      <updated-at type="datetime">2008-07-25T12:39:31+01:00</updated-at>
      <user-id type="integer">25412</user-id>
      <user-name>Raul Murciano</user-name>
      <creator-name>Raul Murciano</creator-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/702</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>I've found a similar bug on this ticket:

  http://dev.rubyonrails.org/ticket/7124

The ticket is closed as fixed, but maybe the xhr alias is related with the problem: using xml_http_request instead xhr doesn't throw the mentioned ArgumentError and the tests work as expected.</body>
      <body-html>&lt;div&gt;&lt;p&gt;
I've found a similar bug on this ticket:
&lt;/p&gt;&lt;p&gt;
&lt;a href=&quot;http://dev.rubyonrails.org/ticket/7124&quot;&gt;http://dev.rubyonrails.org/ticke...&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;
The ticket is closed as fixed, but maybe the xhr alias is related with the problem: using xml_http_request instead xhr doesn't throw the mentioned ArgumentError and the tests work as expected.
&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-07-25T18:37:24+01:00</created-at>
      <creator-id type="integer">25412</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">702</number>
      <permalink>argumenterror-on-xhr-integration-tests</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>new</state>
      <tag>2.1 actionpack bug tests</tag>
      <title>ArgumentError on xhr integration tests</title>
      <updated-at type="datetime">2008-07-25T18:37:24+01:00</updated-at>
      <user-id type="integer">25412</user-id>
      <user-name>Raul Murciano</user-name>
      <creator-name>Raul Murciano</creator-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/702</url>
      <milestone-title>2.x</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">1</attachments-count>
      <body>Staling out, please reopen if this is still a problem.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Staling out, please reopen if this is still a problem.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-28T16:33:15+00:00</created-at>
      <creator-id type="integer">25412</creator-id>
      <diffable-attributes type="yaml">--- 
:state: new
</diffable-attributes>
      <milestone-id type="integer">9903</milestone-id>
      <number type="integer">702</number>
      <permalink>argumenterror-on-xhr-integration-tests</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">8994</project-id>
      <state>stale</state>
      <tag>2.1 actionpack bug tests</tag>
      <title>ArgumentError on xhr integration tests</title>
      <updated-at type="datetime">2008-10-28T16:33:20+00:00</updated-at>
      <user-id type="integer">424</user-id>
      <user-name>Joshua Peek</user-name>
      <creator-name>Raul Murciano</creator-name>
      <url>http://rails.lighthouseapp.com/projects/8994/tickets/702</url>
      <milestone-title>2.x</milestone-title>
    </version>
  </versions>
  <attachments type="array">
    <attachment type="Attachment">
      <code>fdc9cc975f3fdae72d7bac8cf58d08f102bc15c4</code>
      <content-type>text/plain</content-type>
      <created-at type="datetime">2008-07-25T12:39:31+01:00</created-at>
      <filename>integration_xhr_without_flash.diff</filename>
      <height type="integer" nil="true"></height>
      <id type="integer">34934</id>
      <size type="integer">1309</size>
      <uploader-id type="integer">25412</uploader-id>
      <width type="integer" nil="true"></width>
      <url>http://rails.lighthouseapp.com/attachments/34934/integration_xhr_without_flash.diff</url>
    </attachment>
  </attachments>
</ticket>
