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