From 0277106a08a8837542bd5a67a25834896d57dbd4 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Tue, 17 Nov 2015 10:14:11 +0100 Subject: [PATCH] fixes specs --- spec/models/debate_spec.rb | 2 +- spec/models/proposal_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/models/debate_spec.rb b/spec/models/debate_spec.rb index dba82ea6b..0b29d5b2a 100644 --- a/spec/models/debate_spec.rb +++ b/spec/models/debate_spec.rb @@ -251,7 +251,7 @@ describe Debate do end it "decays in older debates, even if they have more votes" do - older_more_voted = create(:debate, :with_hot_score, created_at: now - 2.days, cached_votes_total: 1000, cached_votes_up: 900) + older_more_voted = create(:debate, :with_hot_score, created_at: now - 5.days, cached_votes_total: 1000, cached_votes_up: 900) new_less_voted = create(:debate, :with_hot_score, created_at: now, cached_votes_total: 10, cached_votes_up: 9) expect(new_less_voted.hot_score).to be > older_more_voted.hot_score end diff --git a/spec/models/proposal_spec.rb b/spec/models/proposal_spec.rb index 8193bf701..917d3db32 100644 --- a/spec/models/proposal_spec.rb +++ b/spec/models/proposal_spec.rb @@ -238,7 +238,7 @@ describe Proposal do end it "decays in older proposals, even if they have more votes" do - older_more_voted = create(:proposal, :with_hot_score, created_at: now - 2.days, cached_votes_up: 900) + older_more_voted = create(:proposal, :with_hot_score, created_at: now - 5.days, cached_votes_up: 900) new_less_voted = create(:proposal, :with_hot_score, created_at: now, cached_votes_up: 9) expect(new_less_voted.hot_score).to be > older_more_voted.hot_score end