]> git.openstreetmap.org Git - rails.git/blob - test/factories/user_blocks.rb
Get rid of hardwired counts in assertions
[rails.git] / test / factories / user_blocks.rb
1 FactoryGirl.define do
2   factory :user_block do
3     sequence(:reason) { |n| "User Block #{n}" }
4     ends_at Time.now + 1.day
5
6     # FIXME: requires User factory
7     user_id 13
8
9     # FIXME: requires User factory
10     creator_id 15
11
12     trait :needs_view do
13       needs_view true
14     end
15
16     trait :expired do
17       ends_at Time.now - 1.day
18     end
19
20     trait :revoked do
21       # FIXME: requires User factory
22       revoker_id 5
23     end
24   end
25 end