#109 ✓resolved
Kieran P

Redirects work in browser but fail in Webrat

Reported by Kieran P | January 4th, 2009 @ 06:29 PM | in 0.4

Since this commit onwards (http://github.com/brynary/webrat... a certain type of redirect (not all) in our application has been failing. From what I can tell, it's trimming the object we send through to a hash of it's attributes, but without an id. So when we try to find what we need using the id, it fails....

If I reset the webrat repo back before that commit, things start working again. The redirects work fine in the browser. Only integration testing is showing these errors (it causes error 500 which result in E).

I'm trying to make a small reproducable application now. Will post a link to it's upload when ready.

Comments and changes to this ticket

  • Kieran P

    Kieran P January 4th, 2009 @ 07:11 PM

    Ok. Here is the reproducable app.


    It looks like an issue with Webrat and Rails 2.1.

    As mentioned before, earlier versions of webrat didn't have this problem. But I've also discovered later versions of Rails (2.2 onward) don't either.

    So to get this issue replicated, install latest webrat plugin, and vendor rails 2.1. then run the rake test:integration.

    You'll probably see why soon enough, but my guess is that it's not reassigning the params[:post]. The redirect happens, but it's still got the details from the form post, not the post object when it's created. I may be wrong, but that's what it looks like anyway.

  • Bryan Helmkamp

    Bryan Helmkamp January 4th, 2009 @ 10:02 PM

    • Assigned user changed from “Bryan Helmkamp” to “Josh Knowles”
  • Bryan Helmkamp

    Bryan Helmkamp January 17th, 2009 @ 11:17 AM

    • Milestone set to 0.4
  • Bryan Helmkamp

    Bryan Helmkamp January 19th, 2009 @ 11:06 PM

    • State changed from “new” to “resolved”

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