Forum: Ruby on Rails [test] assert response or redirect

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.
Kad K. (Guest)
on 2007-05-19 22:00
I am testing  my update action

      render :update do |page|
        page.redirect_to :controller => 'proposals', :action => 'list'

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

Fabien J. (Guest)
on 2007-05-20 17:38
(Received via mailing list)
On 5/19/07, Kad K. <removed_email_address@domain.invalid> wrote:
> 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 :

or do a 'real' redirection.
This topic is locked and can not be replied to.