2013-10-04 11:28:49 +08:00
|
|
|
Fabricator(:user_stat) do
|
|
|
|
end
|
|
|
|
|
2013-02-06 03:16:51 +08:00
|
|
|
Fabricator(:user) do
|
|
|
|
name 'Bruce Wayne'
|
|
|
|
username { sequence(:username) { |i| "bruce#{i}" } }
|
|
|
|
email { sequence(:email) { |i| "bruce#{i}@wayne.com" } }
|
|
|
|
password 'myawesomepassword'
|
2013-03-01 20:07:44 +08:00
|
|
|
trust_level TrustLevel.levels[:basic]
|
2013-10-12 01:33:23 +08:00
|
|
|
ip_address { sequence(:ip_address) { |i| "99.232.23.#{i%254}"} }
|
2013-02-06 03:16:51 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
Fabricator(:coding_horror, from: :user) do
|
|
|
|
name 'Coding Horror'
|
2013-02-26 00:42:20 +08:00
|
|
|
username 'CodingHorror'
|
2013-02-06 03:16:51 +08:00
|
|
|
email 'jeff@somewhere.com'
|
|
|
|
password 'mymoreawesomepassword'
|
|
|
|
end
|
|
|
|
|
|
|
|
Fabricator(:evil_trout, from: :user) do
|
|
|
|
name 'Evil Trout'
|
2013-02-26 00:42:20 +08:00
|
|
|
username 'eviltrout'
|
2013-02-06 03:16:51 +08:00
|
|
|
email 'eviltrout@somewhere.com'
|
|
|
|
password 'imafish'
|
|
|
|
end
|
|
|
|
|
|
|
|
Fabricator(:walter_white, from: :user) do
|
|
|
|
name 'Walter White'
|
2013-02-26 00:42:20 +08:00
|
|
|
username 'heisenberg'
|
2013-02-06 03:16:51 +08:00
|
|
|
email 'wwhite@bluemeth.com'
|
|
|
|
password 'letscook'
|
|
|
|
end
|
|
|
|
|
|
|
|
Fabricator(:moderator, from: :user) do
|
2013-05-31 23:41:40 +08:00
|
|
|
name { sequence(:name) {|i| "A#{i} Moderator"} }
|
|
|
|
username { sequence(:username) {|i| "moderator#{i}"} }
|
|
|
|
email { sequence(:email) {|i| "moderator#{i}@discourse.org"} }
|
2013-03-20 12:05:19 +08:00
|
|
|
moderator true
|
2013-02-06 03:16:51 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
Fabricator(:admin, from: :user) do
|
|
|
|
name 'Anne Admin'
|
2013-05-31 23:41:40 +08:00
|
|
|
username { sequence(:username) {|i| "anne#{i}"} }
|
|
|
|
email { sequence(:email) {|i| "anne#{i}@discourse.org"} }
|
2013-02-06 03:16:51 +08:00
|
|
|
admin true
|
|
|
|
end
|
|
|
|
|
2013-04-18 07:11:13 +08:00
|
|
|
Fabricator(:newuser, from: :user) do
|
2013-04-06 01:59:00 +08:00
|
|
|
name 'Newbie Newperson'
|
|
|
|
username 'newbie'
|
|
|
|
email 'newbie@new.com'
|
2013-04-18 07:11:13 +08:00
|
|
|
trust_level TrustLevel.levels[:newuser]
|
2013-04-06 01:59:00 +08:00
|
|
|
end
|
2013-07-12 06:47:06 +08:00
|
|
|
|
|
|
|
Fabricator(:active_user, from: :user) do
|
|
|
|
name 'Luke Skywalker'
|
|
|
|
username { sequence(:username) { |i| "luke#{i}" } }
|
|
|
|
email { sequence(:email) { |i| "luke#{i}@skywalker.com" } }
|
|
|
|
password 'myawesomepassword'
|
|
|
|
trust_level TrustLevel.levels[:basic]
|
|
|
|
active true
|
2014-06-10 13:19:08 +08:00
|
|
|
|
|
|
|
after_create do |user|
|
|
|
|
user.user_profile.bio_raw = "Don't ask me about my dad!"
|
|
|
|
user.user_profile.save!
|
|
|
|
end
|
2013-10-04 11:28:49 +08:00
|
|
|
end
|
2014-03-13 22:47:37 +08:00
|
|
|
|
|
|
|
Fabricator(:leader, from: :user) do
|
|
|
|
name 'Leader McLeaderman'
|
|
|
|
username { sequence(:username) { |i| "leader#{i}" } }
|
|
|
|
email { sequence(:email) { |i| "leader#{i}@leaderfun.com" } }
|
|
|
|
trust_level TrustLevel.levels[:leader]
|
|
|
|
end
|
|
|
|
|
|
|
|
Fabricator(:elder, from: :user) do
|
|
|
|
name 'Elder McElderson'
|
|
|
|
username { sequence(:username) { |i| "elder#{i}" } }
|
|
|
|
email { sequence(:email) { |i| "elder#{i}@elderfun.com" } }
|
|
|
|
trust_level TrustLevel.levels[:elder]
|
2014-06-08 03:52:51 +08:00
|
|
|
end
|