mirror of
https://github.com/discourse/discourse.git
synced 2025-09-08 12:06:51 +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:
parent
40174962e2
commit
045a2abcec
35 changed files with 459 additions and 473 deletions
|
@ -44,14 +44,14 @@ describe Email::Processor do
|
|||
Email::Processor.process!(mail2)
|
||||
}.to change { EmailLog.count }.by(0)
|
||||
|
||||
Timecop.freeze(Date.today + 1) do
|
||||
key = "rejection_email:#{[from]}:email_reject_empty:#{Date.today}"
|
||||
$redis.expire(key, 0)
|
||||
freeze_time(Date.today + 1)
|
||||
|
||||
expect {
|
||||
Email::Processor.process!(mail3)
|
||||
}.to change { EmailLog.count }.by(1)
|
||||
end
|
||||
key = "rejection_email:#{[from]}:email_reject_empty:#{Date.today}"
|
||||
$redis.expire(key, 0)
|
||||
|
||||
expect {
|
||||
Email::Processor.process!(mail3)
|
||||
}.to change { EmailLog.count }.by(1)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue