From 640ced004d434513ac8e1ed4e87127609c0af259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 24 Jul 2017 11:01:53 +0200 Subject: [PATCH] FIX: wasn't unfreezing time in email processor spec --- spec/components/email/processor_spec.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/spec/components/email/processor_spec.rb b/spec/components/email/processor_spec.rb index b99ae784108..a58cd26078e 100644 --- a/spec/components/email/processor_spec.rb +++ b/spec/components/email/processor_spec.rb @@ -44,13 +44,14 @@ describe Email::Processor do Email::Processor.process!(mail2) }.to change { EmailLog.count }.by(0) - Timecop.freeze(Date.today + 1) - key = "rejection_email:#{[from]}:email_reject_empty:#{Date.today}" - $redis.expire(key, 0) + Timecop.freeze(Date.today + 1) do + key = "rejection_email:#{[from]}:email_reject_empty:#{Date.today}" + $redis.expire(key, 0) - expect { - Email::Processor.process!(mail3) - }.to change { EmailLog.count }.by(1) + expect { + Email::Processor.process!(mail3) + }.to change { EmailLog.count }.by(1) + end end end