Commit 310845cf authored by Robert Speicher's avatar Robert Speicher

Remove instance variable assignment from `gitlab_sign_in` helper

Also removes `Thread.current[:current_user]` assignment from
`gitlab_sign_in_via`
parent 204f4c5c
......@@ -15,14 +15,16 @@ module LoginHelpers
# user = create(:user)
# gitlab_sign_in(user)
def gitlab_sign_in(user_or_role, **kwargs)
@user =
user =
if user_or_role.is_a?(User)
user_or_role
else
create(user_or_role)
end
gitlab_sign_in_with(@user, **kwargs)
gitlab_sign_in_with(user, **kwargs)
user
end
def gitlab_sign_in_via(provider, user, uid)
......@@ -53,8 +55,6 @@ module LoginHelpers
check 'user_remember_me' if remember
click_button "Sign in"
Thread.current[:current_user] = user
end
def mock_auth_hash(provider, uid, email)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment