Forum: Ruby on Rails Help with xhr request in integration tests

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
822a498b26a2cb7d1f0f2e7e37ce61b2?d=identicon&s=25 Ed Howland (Guest)
on 2006-05-31 18:21
(Received via mailing list)
Hello,

The documentation at api.rubyonrails.com for
ActionController::TestProcess#xhr or xml_http_reponse gives method as
the first parameter and action as the second parameter folled by the
parameters hash, etc. But ActionController::Integration::Session#xhr
has a path, followed by the parametes hash, and apparently no alias
for xhr. Of course, the documentation  in the AWDwR book would tend to
throw one off (I know that integration tests are new.)

In my views I have either a link_to_remote tag or either a
form_remote_tag or submit_to_remote tag. When integration testing, how
does Rails know whether it is a xhr :get or a xhr :post just from the
path?

Thanks.
This topic is locked and can not be replied to.