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:
parent
e5bf318178
commit
b9d13df483
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue