]> git.openstreetmap.org Git - rails.git/commitdiff
Merge pull request #4604 from AntonKhorev/block-factory-revoked-expired
authorAndy Allan <git@gravitystorm.co.uk>
Thu, 21 Mar 2024 10:43:00 +0000 (10:43 +0000)
committerGitHub <noreply@github.com>
Thu, 21 Mar 2024 10:43:00 +0000 (10:43 +0000)
Make factory-created revoked blocks inactive

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