2013-10-03 22:28:49 -05:00
|
|
|
Fabricator(:user_stat) do
|
|
|
|
end
|
|
|
|
|
2013-02-05 13:16:51 -06:00
|
|
|
Fabricator(:user) do
|
|
|
|
name 'Bruce Wayne'
|
|
|
|
username { sequence(:username) { |i| "bruce#{i}" } }
|
|
|
|
email { sequence(:email) { |i| "bruce#{i}@wayne.com" } }
|
|
|
|
password 'myawesomepassword'
|
2014-09-05 00:20:39 -05:00
|
|
|
trust_level TrustLevel[1]
|
2017-07-27 20:20:09 -05:00
|
|
|
ip_address { sequence(:ip_address) { |i| "99.232.23.#{i % 254}" } }
|
2014-08-13 12:30:25 -05:00
|
|
|
active true
|
2013-02-05 13:16:51 -06:00
|
|
|
end
|
|
|
|
|
|
|
|
Fabricator(:coding_horror, from: :user) do
|
|
|
|
name 'Coding Horror'
|
2013-02-25 10:42:20 -06:00
|
|
|
username 'CodingHorror'
|
2013-02-05 13:16:51 -06:00
|
|
|
email 'jeff@somewhere.com'
|
|
|
|
password 'mymoreawesomepassword'
|
|
|
|
end
|
|
|
|
|
|
|
|
Fabricator(:evil_trout, from: :user) do
|
|
|
|
name 'Evil Trout'
|
2013-02-25 10:42:20 -06:00
|
|
|
username 'eviltrout'
|
2013-02-05 13:16:51 -06:00
|
|
|
email 'eviltrout@somewhere.com'
|
|
|
|
password 'imafish'
|
|
|
|
end
|
|
|
|
|
|
|
|
Fabricator(:walter_white, from: :user) do
|
|
|
|
name 'Walter White'
|
2013-02-25 10:42:20 -06:00
|
|
|
username 'heisenberg'
|
2013-02-05 13:16:51 -06:00
|
|
|
email 'wwhite@bluemeth.com'
|
|
|
|
password 'letscook'
|
|
|
|
end
|
|
|
|
|
2014-10-24 18:20:41 -05:00
|
|
|
Fabricator(:inactive_user, from: :user) do
|
|
|
|
name 'Inactive User'
|
|
|
|
username 'inactive_user'
|
|
|
|
email 'inactive@idontexist.com'
|
2017-04-05 15:14:22 -05:00
|
|
|
password 'qwerqwer123'
|
2014-10-24 18:20:41 -05:00
|
|
|
active false
|
|
|
|
end
|
|
|
|
|
2013-02-05 13:16:51 -06:00
|
|
|
Fabricator(:moderator, from: :user) do
|
2017-07-27 20:20:09 -05:00
|
|
|
name { sequence(:name) { |i| "A#{i} Moderator" } }
|
|
|
|
username { sequence(:username) { |i| "moderator#{i}" } }
|
|
|
|
email { sequence(:email) { |i| "moderator#{i}@discourse.org" } }
|
2013-03-19 23:05:19 -05:00
|
|
|
moderator true
|
2013-02-05 13:16:51 -06:00
|
|
|
end
|
|
|
|
|
|
|
|
Fabricator(:admin, from: :user) do
|
|
|
|
name 'Anne Admin'
|
2017-07-27 20:20:09 -05:00
|
|
|
username { sequence(:username) { |i| "anne#{i}" } }
|
|
|
|
email { sequence(:email) { |i| "anne#{i}@discourse.org" } }
|
2013-02-05 13:16:51 -06:00
|
|
|
admin true
|
|
|
|
end
|
|
|
|
|
2013-04-17 18:11:13 -05:00
|
|
|
Fabricator(:newuser, from: :user) do
|
2013-04-05 12:59:00 -05:00
|
|
|
name 'Newbie Newperson'
|
|
|
|
username 'newbie'
|
|
|
|
email 'newbie@new.com'
|
2014-09-05 00:20:39 -05:00
|
|
|
trust_level TrustLevel[0]
|
2013-04-05 12:59:00 -05:00
|
|
|
end
|
2013-07-11 17:47:06 -05: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'
|
2014-09-05 00:20:39 -05:00
|
|
|
trust_level TrustLevel[1]
|
2014-06-10 00:19:08 -05:00
|
|
|
|
|
|
|
after_create do |user|
|
|
|
|
user.user_profile.bio_raw = "Don't ask me about my dad!"
|
|
|
|
user.user_profile.save!
|
|
|
|
end
|
2013-10-03 22:28:49 -05:00
|
|
|
end
|
2014-03-13 09:47:37 -05:00
|
|
|
|
|
|
|
Fabricator(:leader, from: :user) do
|
2014-08-29 17:57:13 -05:00
|
|
|
name 'Veteran McVeteranish'
|
2014-03-13 09:47:37 -05:00
|
|
|
username { sequence(:username) { |i| "leader#{i}" } }
|
|
|
|
email { sequence(:email) { |i| "leader#{i}@leaderfun.com" } }
|
2014-09-05 00:20:39 -05:00
|
|
|
trust_level TrustLevel[3]
|
2014-03-13 09:47:37 -05:00
|
|
|
end
|
|
|
|
|
2014-09-05 01:52:40 -05:00
|
|
|
Fabricator(:trust_level_4, from: :user) do
|
|
|
|
name 'Leader McElderson'
|
|
|
|
username { sequence(:username) { |i| "tl4#{i}" } }
|
|
|
|
email { sequence(:email) { |i| "tl4#{i}@elderfun.com" } }
|
2014-09-05 00:20:39 -05:00
|
|
|
trust_level TrustLevel[4]
|
2014-06-07 14:52:51 -05:00
|
|
|
end
|
2015-05-10 18:10:10 -05:00
|
|
|
|
|
|
|
Fabricator(:anonymous, from: :user) do
|
|
|
|
name ''
|
|
|
|
username { sequence(:username) { |i| "anonymous#{i}" } }
|
|
|
|
email { sequence(:email) { |i| "anonymous#{i}@anonymous.com" } }
|
|
|
|
trust_level TrustLevel[1]
|
|
|
|
trust_level_locked true
|
|
|
|
|
2017-05-12 01:01:31 -05:00
|
|
|
before_create do |user|
|
2015-05-10 18:10:10 -05:00
|
|
|
user.custom_fields["master_id"] = 1
|
|
|
|
user.save!
|
|
|
|
end
|
|
|
|
end
|
2015-11-09 10:37:33 -06:00
|
|
|
|
|
|
|
Fabricator(:staged, from: :user) do
|
|
|
|
staged true
|
|
|
|
end
|