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
This commit is contained in:
Linca 2024-09-18 09:09:07 +08:00 committed by GitHub
parent 9132153ae6
commit d3064661cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -75,6 +75,7 @@ describe DiscourseDataExplorer::ReportGenerator do
it "works with email recipients" do it "works with email recipients" do
DiscourseDataExplorer::ResultToMarkdown.expects(:convert).returns("le table") DiscourseDataExplorer::ResultToMarkdown.expects(:convert).returns("le table")
freeze_time
email = "john@doe.com" email = "john@doe.com"
result = described_class.generate(query.id, query_params, [email]) result = described_class.generate(query.id, query_params, [email])
@ -96,6 +97,7 @@ describe DiscourseDataExplorer::ReportGenerator do
it "works with duplicate recipients" do it "works with duplicate recipients" do
DiscourseDataExplorer::ResultToMarkdown.expects(:convert).returns("table data") DiscourseDataExplorer::ResultToMarkdown.expects(:convert).returns("table data")
freeze_time
result = described_class.generate(query.id, query_params, [user.username, user.username]) result = described_class.generate(query.id, query_params, [user.username, user.username])