How to test a controller action which is passed params from a form?

here's my code for an action (add_user) in my login_controller, as well as the form that calls add_user: http://rafb.net/paste/results/3Paw8119.html

So in my test of this controller, I want to test add_user. So I need to pass it the name and password. How do I do this?

I know this doesn't work: process 'add_user', 'name' => 'Ben', 'password' => 'password'

Thanks! Ben Lisbakken

from your posted source, your input field names would be generated by rails as

user[name] user[password] user[password_confirmation]

so try

process 'add_user', { 'user[name]' => 'Bob', 'user[password]' => 'password', 'user[password_confirmation]' => 'password' }

chris