From b75c3f331fe43f5893d55f25d055ddf2c9709dcb Mon Sep 17 00:00:00 2001 From: Olivier Brisse Date: Mon, 13 Nov 2017 18:25:31 +1100 Subject: [PATCH] Fix time dependent invoice spec --- .../mailer/mno_enterprise/system_notification_mailer_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/spec/mailer/mno_enterprise/system_notification_mailer_spec.rb b/api/spec/mailer/mno_enterprise/system_notification_mailer_spec.rb index 12110d7e2..dbb0a2310 100644 --- a/api/spec/mailer/mno_enterprise/system_notification_mailer_spec.rb +++ b/api/spec/mailer/mno_enterprise/system_notification_mailer_spec.rb @@ -181,9 +181,11 @@ def invite_vars(orga_invite) describe 'send_invoice' do before do + Timecop.freeze stub_api_v2(:get, "/users/#{user.id}", user, [], {fields: {users: 'email,name'}}) stub_api_v2(:get, "/invoices/#{invoice.id}", invoice) end + after { Timecop.return } let(:invoice) { build(:invoice) } let(:rendered_invoice) { MnoEnterprise::InvoicePdf.new(invoice).render } it 'sends the correct email' do