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) }
32 factory :moderator_user do
33 after(:create) do |user, _evaluator|
34 create(:user_role, :role => "moderator", :user => user)
38 factory :administrator_user do
39 after(:create) do |user, _evaluator|
40 create(:user_role, :role => "administrator", :user => user)