Damian Terentyev
2007-Mar-17 17:50 UTC
Functional tests fail with acts_as_authenticated installed
Hi, all! How can I fake authentication within a functional test? The problem is, after I''ve installed acts_as_authenticated all requests in my functional test are (correctly) redirected to login screen because test "user" is not logged in. I need to "log in" in functional test setup method, but have no ideas about that. Help me please. Yours sincerely, Damian/Three-eyed Fish --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Conrad Taylor
2007-Mar-17 20:05 UTC
Re: Functional tests fail with acts_as_authenticated installed
Hi, did you add a valid user and it''s crenditials to the relevant model''s fixture? In any case, please post your relevant test and associated fixtures file and we can better assist you. -Conrad On 3/17/07, Damian Terentyev <threeeyedfish-HPQIj1OAFZMvJsYlp49lxw@public.gmane.org> wrote:> > Hi, all! > How can I fake authentication within a functional test? > The problem is, after I''ve installed acts_as_authenticated all requests > in my functional test are (correctly) redirected to login screen > because test "user" is not logged in. > I need to "log in" in functional test setup method, but have no ideas > about that. > Help me please. > > Yours sincerely, > Damian/Three-eyed Fish > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Damian Terentyev
2007-Mar-18 05:54 UTC
Re: Functional tests fail with acts_as_authenticated installed
On Mar 17, 2007, at 23:05, Conrad Taylor wrote:> Hi, did you add a valid user and it''s crenditials to the relevant > model''s fixture? In any case, please post your relevant test and > associated fixtures file and we can better assist you.Thank you. Got it. login_as :some_vaild_user makes the trick. Yours sincerely, Damian/Three-eyed Fish --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---