]> git.openstreetmap.org Git - rails.git/commitdiff
Make factory-created revoked blocks inactive
authorAnton Khorev <tony29@yandex.ru>
Thu, 21 Mar 2024 03:09:14 +0000 (06:09 +0300)
committerAnton Khorev <tony29@yandex.ru>
Thu, 21 Mar 2024 03:11:24 +0000 (06:11 +0300)
test/factories/user_blocks.rb

index 2f68dc8dc6c1162512cee03a7859e22ba91ffba0..6d5c02a03614d64a00d54016f33598a56709ac52 100644 (file)
@@ -11,10 +11,12 @@ FactoryBot.define do
     end
 
     trait :expired do
+      created_at { Time.now.utc - 2.days }
       ends_at { Time.now.utc - 1.day }
     end
 
     trait :revoked do
+      expired
       revoker :factory => :moderator_user
     end
   end