Problem with assert_redirected_to on a RESTful route

I’m receiving an exception in my functional test where the message is
“NoMethodError: undefined method `first’ for :users:Symbol”

My routes.rb has this entry:

map.resources :users


My UsersController has a method as:

def create
@user = User.new(params[:user])
@user.save
flash[:notice] = “User was successfully created”
redirect_to user_url(@user)
end


My test methods consists of:
def please_work_for_once
post :create,
{ :user => { :username => “fred”, :password => “blah” } }
assert_equal “User was successfully created”, flash[:notice]
assert_redirected_to :controller => :users
end

It is failing on the assert_redirected_to line. I am using Edge Rails
revision 5884.

Can anyone please tell me what I’m doing wrong here? I’ve searched so
many web pages and discussion groups but no luck at all.