mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +00:00
29 lines
459 B
Ruby
29 lines
459 B
Ruby
FactoryGirl.define do
|
|
sequence :username do |n|
|
|
"Player#{n}"
|
|
end
|
|
|
|
sequence :email do |n|
|
|
"player#{n}@ensl.org"
|
|
end
|
|
|
|
sequence :steamid do |n|
|
|
"0:1:#{n}"
|
|
end
|
|
|
|
factory :user do
|
|
username
|
|
email
|
|
steamid
|
|
firstname "ENSL"
|
|
lastname "Player"
|
|
country "EU"
|
|
raw_password "PasswordABC123"
|
|
|
|
factory :user_with_team do
|
|
after(:create) do |user|
|
|
create(:team, founder: user)
|
|
end
|
|
end
|
|
end
|
|
end
|