]> git.openstreetmap.org Git - rails.git/blob - test/factories/user_blocks.rb
Merge remote-tracking branch 'upstream/pull/4428'
[rails.git] / test / factories / user_blocks.rb
1 FactoryBot.define do
2   factory :user_block do
3     sequence(:reason) { |n| "User Block #{n}" }
4     ends_at { Time.now.utc + 1.day }
5
6     user
7     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.utc - 1.day }
15     end
16
17     trait :revoked do
18       revoker :factory => :moderator_user
19     end
20   end
21 end