Testing /using routes

Hello,

I've just recently discovered the wonderful world of routes. But I can't get my test to work when using them.

An example: I have a ClientController which has an index action. I want to access the action like this: http://mysite/admin/clients For this, I have created a route: map.connect 'admin/clients', :controller => 'client', :action => 'index'

In my test I have:      get "admin/clients"      [ ... some lines of assertions because you need to be logged in ... ]      get "admin/clients"

When my test "hits" the admin/clients url the second time, my test fails with: ActionController::UnknownAction: No action responded to /admin/clients

Why is that? And what is it about routes I have missed?

Greetings, Gitte Wange

I have not yet looked at integration tests. How does they work and are there any docs on these somewhere?

Greetings, Gitte Wange