]> git.openstreetmap.org Git - rails.git/blob - test/factories/user_blocks.rb
For deleted nodes created via factories, make sure the most recent old_node is also...
[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     user
7     association :creator, :factory => :moderator_user
8
9     trait :needs_view do
10       needs_view true
11     end
12
13     trait :expired do
14       ends_at Time.now - 1.day
15     end
16
17     trait :revoked do
18       # FIXME: requires User factory
19       revoker_id 5
20     end
21   end
22 end