Hi, I''m using the restulf_athuentication plugin and have changed it to be used only by a logged in user (an administrator). So, you have to be logged in and activated in order to pass the before_filter :login_required. How do I go about "logging in" when testing? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Put whatever information is needed in the session (user_id?) in your test''s setup method: @request.session = { :user_id => users(:test_user).id } That''s how I''m doing it anyway. b goodieboy wrote:> Hi, > > I''m using the restulf_athuentication plugin and have changed it to be > used only by a logged in user (an administrator). So, you have to be > logged in and activated in order to pass the before_filter > :login_required. How do I go about "logging in" when testing? > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---