mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:11:08 +08:00
FEATURE: remove the timecop gem
We should only have one way of mocking time, misuse of timecop was causing build stability issues
This commit is contained in:
@ -78,7 +78,7 @@ describe ScreenedEmail do
|
||||
|
||||
shared_examples "when a ScreenedEmail record matches" do
|
||||
it "updates statistics" do
|
||||
Timecop.freeze(Time.zone.now) do
|
||||
freeze_time(Time.zone.now) do
|
||||
expect { subject }.to change { screened_email.reload.match_count }.by(1)
|
||||
expect(screened_email.last_match_at).to be_within_one_second_of(Time.zone.now)
|
||||
end
|
||||
|
Reference in New Issue
Block a user