From d7b9ed1bc46dc0ce6500f313caaae0a1c4c9ce65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 2 Sep 2018 23:24:47 +0200 Subject: [PATCH] Use dynamic times and dates in factories (part 2) Most factories were using dynamic times and dates since commit 0cf799a. However: * At the time, commits AyuntamientoMadrid/consul@71f5351 and AyuntamientoMadrid/consul@a476a30 (which introduced static times/dates in factories) hadn't been backported. * The changes in commit 0cf799a overlooked the factory `proposal_notification`. --- spec/factories/budgets.rb | 6 +++--- spec/factories/notifications.rb | 2 +- spec/factories/proposals.rb | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/factories/budgets.rb b/spec/factories/budgets.rb index e509b2cad..d713302fd 100644 --- a/spec/factories/budgets.rb +++ b/spec/factories/budgets.rb @@ -149,11 +149,11 @@ FactoryBot.define do end trait :hidden do - hidden_at Time.current + hidden_at { Time.current } end trait :with_ignored_flag do - ignored_flag_at Time.current + ignored_flag_at { Time.current } end trait :flagged do @@ -163,7 +163,7 @@ FactoryBot.define do end trait :with_confirmed_hide do - confirmed_hide_at Time.current + confirmed_hide_at { Time.current } end end diff --git a/spec/factories/notifications.rb b/spec/factories/notifications.rb index 08f4edb86..b43aa7660 100644 --- a/spec/factories/notifications.rb +++ b/spec/factories/notifications.rb @@ -18,7 +18,7 @@ FactoryBot.define do trait :sent do recipients_count 1 - sent_at Time.current + sent_at { Time.current } end end end diff --git a/spec/factories/proposals.rb b/spec/factories/proposals.rb index 01928cdb1..358411d79 100644 --- a/spec/factories/proposals.rb +++ b/spec/factories/proposals.rb @@ -64,15 +64,15 @@ FactoryBot.define do end trait :ignored do - ignored_at Date.current + ignored_at { Date.current } end trait :hidden do - hidden_at Date.current + hidden_at { Date.current } end trait :with_confirmed_hide do - confirmed_hide_at Time.current + confirmed_hide_at { Time.current } end end