From d3064661cb0d184db91c53f59ca952f785653459 Mon Sep 17 00:00:00 2001 From: Linca <41134017+Lhcfl@users.noreply.github.com> Date: Wed, 18 Sep 2024 09:09:07 +0800 Subject: [PATCH] DEV: Add missing `freeze_time` in report_generator_spec (#327) We are missing two `freeze_time`s in the spec, which makes these two tests flaky tests. ref: t/138542 --- spec/report_generator_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/report_generator_spec.rb b/spec/report_generator_spec.rb index e96848f..b579955 100644 --- a/spec/report_generator_spec.rb +++ b/spec/report_generator_spec.rb @@ -75,6 +75,7 @@ describe DiscourseDataExplorer::ReportGenerator do it "works with email recipients" do DiscourseDataExplorer::ResultToMarkdown.expects(:convert).returns("le table") + freeze_time email = "john@doe.com" result = described_class.generate(query.id, query_params, [email]) @@ -96,6 +97,7 @@ describe DiscourseDataExplorer::ReportGenerator do it "works with duplicate recipients" do DiscourseDataExplorer::ResultToMarkdown.expects(:convert).returns("table data") + freeze_time result = described_class.generate(query.id, query_params, [user.username, user.username])