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.
Ee0293412faca21e4ebf3326ed9d5f8c?d=identicon&s=25 Kad Kerforn (kadoudal)
on 2007-05-19 20: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

Be1e3ee645d23c95ba650c21bc885927?d=identicon&s=25 Fabien Jakimowicz (Guest)
on 2007-05-20 15:38
(Received via mailing list)
On 5/19/07, Kad Kerforn <> 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.