Add test cases for anon/banned/member voting.

This commit is contained in:
evazion
2016-10-14 04:38:41 +00:00
parent 903eff5c24
commit 5e75dcecea
4 changed files with 35 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
FactoryGirl.define do
factory(:ban) do |f|
banner :factory => :admin_user
reason {FFaker::Lorem.words.join(" ")}
duration 60
end

View File

@@ -13,7 +13,11 @@ FactoryGirl.define do
factory(:banned_user) do
is_banned true
ban {|x| x.association(:ban)}
after(:create) { |user| create(:ban, user: user) }
end
factory(:member_user) do
level 20
end
factory(:gold_user) do