Topic: Functional test failure with assert assigns

I'm trying to do a functional test but it's failing when checking to see if a variable has been assigned.  At first I thought it might just be that nothing was being found with my model but I've now tried it with a simple string variable that I'm setting and it is still failing to be assigned.  It might be because I have a redirect (I'm using globalize which is redirecting to /en/controller) - if this is the case how can I get round it?

Here's my controller code:

class MainController < ApplicationController
    def index
    @page_title = "Learning Journey"
    @categories = Category.find_by_published.find_top_level   
    @latest_resources= Resource.find_recent_resources(5)

And here's my test:

    def test_index
        get :index
        assert_response :redirect
        assert_redirected_to :locale => 'en', :controller => 'main', :action => 'index'
        assert assigns(:page_title)
        assert assigns(:categories)
        assert assigns(:latest_resources)

Is it the redirect causing the assigns not to work?  If not, what am I doing wrong?

Re: Functional test failure with assert assigns

Ingore me.  I've fixed it.  I needed to do:

get :index, :locale => 'en'

This way I don't get the redirect and it all works peachy!