Sha256: 91341ec39ca98b7a59f98085e69de56368e43642fcaa97f686aa1c5cd96962d1
Contents?: true
Size: 919 Bytes
Versions: 28
Compression:
Stored size: 919 Bytes
Contents
require "rails_helper" describe ::Dorsale::BillingMachine::InvoiceMultipleVatPdf, pdfs: true do before :each do ::Dorsale::BillingMachine.vat_mode = :multiple end let(:invoice) { i = create(:billing_machine_invoice) create(:billing_machine_invoice_line, :invoice => i, :vat_rate => 19.6, ) i } let(:generate!) { Dorsale::BillingMachine::PdfFileGenerator.(invoice) invoice.reload } let(:content) { generate! Yomu.new(invoice.pdf_file.path).text } it "should not display global vat rate" do expect(content).to_not include "TVA 19,60 %" expect(content).to include "MONTANT TVA" expect(content).to include "TVA %" end it "should work with empty invoice" do invoice = ::Dorsale::BillingMachine::Invoice.new expect { described_class.new(invoice).tap(&:build).render_with_attachments }.to_not raise_error end end
Version data entries
28 entries across 28 versions & 1 rubygems