Commit 483cc5f95182afb6cd926b8cdcedbd9fdfc51ffd
1 parent
c98da824
Exists in
master
set username if configured
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
spec/fabricators/user_fabricator.rb
| 1 | Fabricator :user do | 1 | Fabricator :user do |
| 2 | name 'Clyde Frog' | 2 | name 'Clyde Frog' |
| 3 | email { sequence(:user_email) { |n| "user.#{n}@example.com" } } | 3 | email { sequence(:user_email) { |n| "user.#{n}@example.com" } } |
| 4 | + if Errbit::Config.user_has_username | ||
| 5 | + username { sequence(:username) { |n| "User Name #{n}" } } | ||
| 6 | + end | ||
| 4 | password 'password' | 7 | password 'password' |
| 5 | password_confirmation 'password' | 8 | password_confirmation 'password' |
| 6 | end | 9 | end |