Add the closed trait to changeset factories.
authorAndy Allan <git@gravitystorm.co.uk>
Fri, 31 Mar 2017 09:47:28 +0000 (10:47 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Fri, 31 Mar 2017 09:47:41 +0000 (10:47 +0100)
test/factories/changesets.rb

index f76b73126d0374eed28f9eb0a9d03138571bf4f0..01d3571981e5db09cd77b1ce71ff3af9cf42030b 100644 (file)
@@ -4,5 +4,10 @@ FactoryGirl.define do
     closed_at Time.now.utc + 1.day
 
     user
+
+    trait :closed do
+      created_at Time.now.utc - 5.hours
+      closed_at Time.now.utc - 4.hours
+    end
   end
 end