2016-12-16 11:21:28 -05:00
|
|
|
module IntegrationHelpers
|
|
|
|
def sign_in(user)
|
|
|
|
password = 'somecomplicatedpassword'
|
|
|
|
user.update!(password: password)
|
|
|
|
Fabricate(:email_token, confirmed: true, user: user)
|
2017-07-27 21:20:09 -04:00
|
|
|
post "/session.json", login: user.username, password: password
|
2016-12-16 11:21:28 -05:00
|
|
|
expect(response).to be_success
|
|
|
|
end
|
|
|
|
end
|