app.kluk.fr/spec/support/authentication_helper.rb
Christophe Robillard aa619aa99b create day_log
2026-04-06 10:56:50 +02: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