Follow up - 9402699a42 - DX: Developer should not need to add a password for each created user that should login. Therefore create one if non is set yet.

This commit is contained in:
Thorsten Eckel 2020-04-30 16:20:31 +02:00
parent 49b21b147f
commit 215cfb7990

View file

@ -21,7 +21,10 @@ RSpec.configure do |config|
user = instance_exec(&authenticated)
password = user.password_plain
raise "Can't authenticate user that has no password set" if password.blank?
if password.blank?
password = 'automagically set by your friendly capybara helper'
user.update!(password: password)
end
credentials = {
username: user.email,