Files
danbooru/test/factories/user.rb
albert 17881068e1 * Removed Pixa/Tinami sources
* Upgraded to Rails 3.2.3
* Fixed tests
2012-06-01 19:22:58 -04:00

39 lines
663 B
Ruby

FactoryGirl.define do
factory(:user) do
name {rand(1_000_000).to_s}
password "password"
password_hash {User.sha1("password")}
email {Faker::Internet.email}
default_image_size "large"
base_upload_limit 10
level 20
last_logged_in_at {Time.now}
factory(:banned_user) do
is_banned true
ban {|x| x.association(:ban)}
end
factory(:privileged_user) do
level 30
end
factory(:contributor_user) do
level 33
end
factory(:janitor_user) do
level 35
end
factory(:moderator_user) do
level 40
end
factory(:admin_user) do
level 50
end
end
end