Forum: Ruby on Rails newbie testing: xml_http_request and route, route not recognised

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
2701c824d560c66c31b3d58d36fe17cf?d=identicon&s=25 itsastickup (Guest)
on 2009-01-28 00:44
(Received via mailing list)
In my view the generated html has this, and it works just fine:

<a href="/people/2/movies/19" method="delete" onclick="if (confirm
('Delete "Highlander". Are you sure?')) { new Ajax.Request('/people/2/
movies/19', {asynchronous:true, evalScripts:true, method:'delete',
parameters:'authenticity_token=' + encodeURIComponent
('3a75bac4c7d8a5a2470788e7c428d2b76928aa3c')}); }; return

So in my functional tests I tried the following and it tells me the
action isn't recognized, as if it isn't translating the :delete method
to the destroy action in the controller :

xml_http_request :delete, person_movie_path(movies

"rake test" gets me :

ActionController::UnknownAction: No action responded to /people/
520095529/movies/953125641. Actions: create, create_guid
, delete_more_than, destroy, edit, edit_person_movie_path, exception,
exception=, index, log_for_stats, log_login, new,
redirect_loop_or_default, referrer_url, rescue_action_without_handler,
save_referrer_to_cookie, store_loop, and update

I'm a bit perplexed. googling didn't get me any clues. The route is
correct, I think. See this pastie if you
think my movie routes may be up the spout.

Any ideas? (I hope so)
This topic is locked and can not be replied to.