On 5/19/07, Kad Kerforn
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:>
>
> I am testing my update action
>
> render :update do |page|
> page.redirect_to :controller => ''proposals'',
:action => ''list''
> end
>
>
> if I asser a response
>
> post :update
> assert_response 200
>
>
> it''s OK
>
> but not if I try to assert the redirect
>
> assert_redirected_to "/proposals/list/"
>
>
> is it the right assertion ?
>
> tfy help
>
> kad
This redirection is done via ajax calls, response will always be 200.
You should take a look at this plugin to test ajax calls :
http://glu.ttono.us/articles/2006/05/29/guide-test-driven-rjs-with-arts
or do a ''real'' redirection.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---