Sha256: 8a009da3598448671ba19a1d1c723db76ed5b02d6582842012bb4e3cd6604eb5

Contents?: true

Size: 1.5 KB

Versions: 5

Compression:

Stored size: 1.5 KB

Contents

require 'pdf/inspector'

lib = File.expand_path('../../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'invoice_printer'
require 'test_ext'
require 'minitest/autorun'

# Test helpers
module InvoicePrinterHelpers
  def default_document_params
    {
      number: '198900000001',
      provider_name: 'Business s.r.o.',
      provider_tax_id: '56565656',
      provider_tax_id2: '465454',
      provider_street: 'Rolnicka',
      provider_street_number: '1',
      provider_postcode: '747 05',
      provider_city: 'Opava',
      provider_city_part: 'Katerinky',
      provider_extra_address_line: 'Czech Republic',
      purchaser_name: 'Adam',
      purchaser_tax_id: nil,
      purchaser_tax_id2: nil,
      purchaser_street: 'Ostravska',
      purchaser_street_number: '1',
      purchaser_postcode: '747 70',
      purchaser_city: 'Opava',
      purchaser_city_part: '',
      purchaser_extra_address_line: '',
      issue_date: '19/03/3939',
      due_date: '19/03/3939',
      subtotal: '175',
      tax: '5',
      tax2: '10',
      tax3: '20',
      total: '$ 200',
      bank_account_number: '156546546465',
      account_iban: 'IBAN464545645',
      account_swift: 'SWIFT5456',
      items: [
        InvoicePrinter::Document::Item.new(
          default_document_item_params
        )
      ]
    }
  end

  def default_document_item_params
    {
      name: 'Web consultation',
      quantity: '2',
      unit: 'hours',
      price: '$ 25',
      tax: '$ 1',
      amount: '$ 100'
    }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
invoice_printer-1.1.0 test/test_helper.rb
invoice_printer-1.1.0.rc1 test/test_helper.rb
invoice_printer-1.0.0 test/test_helper.rb
invoice_printer-1.0.0.rc1 test/test_helper.rb
invoice_printer-0.0.9 test/test_helper.rb