2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-08 12:06:51 +08:00
discourse/spec/support/integration_helpers.rb

10 lines
293 B
Ruby
Raw Normal View History

module IntegrationHelpers
def sign_in(user)
password = 'somecomplicatedpassword'
user.update!(password: password)
Fabricate(:email_token, confirmed: true, user: user)
2017-07-28 10:20:09 +09:00
post "/session.json", login: user.username, password: password
expect(response).to be_success
end
end