How to test a controller that needs to be logged?


#1

Hi,

I know that I should use IntegrationTests to test flows of data. For
example, when an action requires various controllers. My question is, if
I can’t post to another controller from for example
organizacions_controller_test.rb, how I can test its actions if those
actions require to be logged?

I can’t post ‘users/login’, :user => {…}
I can’t post {:controller => ‘users’, :action=>‘login’}, :user =>{…}

etc…

Thanks.