Testing apps with HTTP authentication AND redirection

does anybody know how can I test a controller in a Rails app (using
the Rails testing framework) that requires HTTP authentication, and
redirects after that?

With integration (I mean, using UserFlowsTest <
ActionController::IntegrationTest) tests I know I can
follow_redirect! , but I don’t know how to do the authentication.

With inheriting the test class from ActionController::TestCase won’t
give me the follow_redirect! method. You see, I know how to
authenticate in this case, but can’t folllow redirections.

I found some interesting links, but they weren’t enough:

Any help would be great!