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:
parent
49b21b147f
commit
215cfb7990
1 changed files with 4 additions and 1 deletions
|
@ -21,7 +21,10 @@ RSpec.configure do |config|
|
||||||
user = instance_exec(&authenticated)
|
user = instance_exec(&authenticated)
|
||||||
password = user.password_plain
|
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 = {
|
credentials = {
|
||||||
username: user.email,
|
username: user.email,
|
||||||
|
|
Loading…
Reference in a new issue