Forum: Ruby on Rails One functional test spoils another.

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.
Fritz A. (Guest)
on 2008-12-17 22:23
In my functional test suite, I have two tests. Each is meant to test the
redirection that "verify :method => :post" will do when I trigger the
respective actions with a GET instead of a POST.

In both tests, I have a follow_redirect.

If both tests are present (or more precisely, if the follow_redirect is
present in the alphabetically-earlier one), the second test will fail at
the assert_redirected_to. The redirected URL is a loopback to the
action's URL. That redirection might have come from ssl_required, though
the original request includes HTTPS.

So anyway, if I do a follow_redirect after a get in a functional test,
redirections following gets'es in later tests are screwed up.

Is this known?

Is there anything I can do about it?

    — F

ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
Rails 1.2.6
This topic is locked and can not be replied to.