#9 ✓resolved
Mark Dodwell

Follow redirect after POST

Reported by Mark Dodwell | May 23rd, 2008 @ 07:30 PM

When you post a login controller action that successfully logins sends a redirect webrat does not to follow the redirected URL.

For example, with a controller with the following:

  def login
    if user = User.authenticate(params['username'], params['password'])
        session[:user_id] = user.id
        redirect_to 'admin/dashboard'
        flash[:notice] = "Login unsuccessful."


post '/admin/login', { 'username' => 'joe', 'password' => '1234' }

is not the same as doing this:

post '/admin/login', { 'username' => 'joe', 'password' => '1234' }
get 'admin/dashboard'

I believe this is a bug.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Ruby Acceptance Testing for Web applications.

Shared Ticket Bins