app.kluk.fr/spec/support/authentication_helper.rb
2026-03-20 18:58:10 +01:00

12 lines
256 B
Ruby

module AuthenticationHelper
def login_as(user)
post session_path, params: {
email_address: user.email_address,
password: user.password
}
end
end
RSpec.configure do |config|
config.include AuthenticationHelper, type: :request
end