Problem with Functional Tests

18 views
Skip to first unread message

dcorbin

unread,
Sep 11, 2010, 8:20:16 PM9/11/10
to Devise
I'm trying to use devise in a rails app, and it's working great in all
respects, except one.

In my functional tests, even though I've called "sign_in
users(:user1)", when my controller has
"before_filter :authenticate_user!" in it, it redirects me to the
login page. I've spent many hours digging through devise and warden
code trying to figure out what I'm missing, but have not be successful
yet. I've verified that users(:user1) is providing a User.

Can you suggest a further avenue of exploration?
Many thanks.

I'm using rails 3.0.0, devise 1.1.2 and warden 0.10.7

José Valim

unread,
Sep 12, 2010, 3:15:05 AM9/12/10
to plataforma...@googlegroups.com, Devise
Try checking what is in your flash messages. They usually contain the
reason why your user can't sign in. Another option is to call active?
In the model and see if it returns true or not.

Sent from my iPhone

Reply all
Reply to author
Forward
0 new messages