Skip to content

Commit

Permalink
Merge pull request #573 from ouranos/feature/fix-invoice-spec
Browse files Browse the repository at this point in the history
Fix time dependent invoice spec
  • Loading branch information
x4d3 authored Nov 13, 2017
2 parents cf3e0d5 + b75c3f3 commit 570b344
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 570b344

Please sign in to comment.