fix(spec): avoid flacky test. 15.days ago is not always on the previous month. eg: this spec failed on 16 of december, stats is still in december

This commit is contained in:
Martin 2021-12-16 15:02:17 +01:00
parent e5bf318178
commit b9d13df483

View file

@ -1,4 +1,7 @@
describe StatsController, type: :controller do describe StatsController, type: :controller do
before { Timecop.travel(Date.parse("2021/12/15")) }
after { Timecop.return }
describe "#last_four_months_hash" do describe "#last_four_months_hash" do
context "while a regular user is logged in" do context "while a regular user is logged in" do
before do before do