Module | AuthenticatedTestHelper
In: | lib/authenticated_test_helper.rb

### Methods

authorize_as login_as

### Public Instance methods

authorize_as(user)

[Source]

       # File lib/authenticated_test_helper.rb, line 7
    7:   def authorize_as(user)
    8:     @request.env["HTTP_AUTHORIZATION"] = user ? ActionController::HttpAuthentication::Basic.encode_credentials(users(user).login, 'test') : nil
    9:   end

login_as(user)

Sets the current user in the session from the user fixtures.

[Source]

       # File lib/authenticated_test_helper.rb, line 3
    3:   def login_as(user)
    4:     @request.session[:user_id] = user ? users(user).id : nil
    5:   end

[Validate]