]> git.openstreetmap.org Git - rails.git/blobdiff - test/factories/user_blocks.rb
Change auth provider logo alt texts to indicate that these are logos
[rails.git] / test / factories / user_blocks.rb
index fefbba45ace1b61fbd3932ea1851ba6e5a69fd67..6d5c02a03614d64a00d54016f33598a56709ac52 100644 (file)
@@ -4,18 +4,20 @@ FactoryBot.define do
     ends_at { Time.now.utc + 1.day }
 
     user
-    association :creator, :factory => :moderator_user
+    creator :factory => :moderator_user
 
     trait :needs_view do
       needs_view { true }
     end
 
     trait :expired do
+      created_at { Time.now.utc - 2.days }
       ends_at { Time.now.utc - 1.day }
     end
 
     trait :revoked do
-      association :revoker, :factory => :moderator_user
+      expired
+      revoker :factory => :moderator_user
     end
   end
 end