Login Engine & Functional Tests

Hello,

I’m creating some functional tests form my controler, and most actions
require
login. I’m using login engine to manage the login functionalities.

I would like to know how can I login a user in a functional test. This
is, the first thing that I would like to do is to login a user. This way
the response will return :success instead of :redirect.

Thanks in advance.

Hi Jame,

You are right. After a few searches I found the answer in here:
http://groups.google.pt/group/rails_archive/browse_thread/thread/ffa756b0d947ece8/6c9a05c4c8d7b13b?lnk=st&q=login+engine++test&rnum=1&hl=pt-PT#6c9a05c4c8d7b13b

Thank you.

James A. wrote:

Hi Gama,

This has been covered many times in various mailing lists - hopefully
Google can help you out with the specifics, but the gist of it is that
you need to put a User in your tests’ sessions, so it appears that
someone is logged in.

  • james

Hi Gama,

This has been covered many times in various mailing lists - hopefully
Google can help you out with the specifics, but the gist of it is that
you need to put a User in your tests’ sessions, so it appears that
someone is logged in.

  • james