3 sequence(:email) { |n| "user#{n}@example.com" }
4 sequence(:display_name) { |n| "User #{n}" }
5 pass_crypt Digest::MD5.hexdigest("test")
7 trait :with_home_location do
8 home_lat { rand(-90.0...90.0) }
9 home_lon { rand(-180.0...180.0) }
12 factory :moderator_user do
13 after(:create) do |user, _evaluator|
14 create(:user_role, :role => "moderator", :user => user)
18 factory :administrator_user do
19 after(:create) do |user, _evaluator|
20 create(:user_role, :role => "administrator", :user => user)