Sha256: 35c3045424a6cca3c2cd1529724b0bd0fe391f2e98f61f52e7604e4e7a7b25d2

Contents?: true

Size: 716 Bytes

Versions: 12

Compression:

Stored size: 716 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'
require 'fortnox/api'
require 'fortnox/api/mappers/invoice'
require 'fortnox/api/mappers/examples/mapper'

describe Fortnox::API::Mapper::Invoice do
  key_map =
    {
      administration_fee_vat: 'AdministrationFeeVAT',
      edi_information: 'EDIInformation',
      eu_quarterly_report: 'EUQuarterlyReport',
      freight_vat: 'FreightVAT',
      housework: 'HouseWork',
      ocr: 'OCR',
      total_vat: 'TotalVAT',
      vat_included: 'VATIncluded'
    }

  json_entity_type = 'Invoice'
  json_entity_collection = 'Invoices'

  it_behaves_like 'mapper', key_map, json_entity_type, json_entity_collection do
    let(:mapper) { described_class.new }
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
fortnox-api-0.9.1 spec/fortnox/api/mappers/invoice_spec.rb
fortnox-api-0.8.2 spec/fortnox/api/mappers/invoice_spec.rb
fortnox-api-0.8.1 spec/fortnox/api/mappers/invoice_spec.rb
fortnox-api-0.9.0 spec/fortnox/api/mappers/invoice_spec.rb
fortnox-api-0.8.0 spec/fortnox/api/mappers/invoice_spec.rb
fortnox-api-0.7.2 spec/fortnox/api/mappers/invoice_spec.rb
fortnox-api-0.7.1 spec/fortnox/api/mappers/invoice_spec.rb
fortnox-api-0.7.0 spec/fortnox/api/mappers/invoice_spec.rb
fortnox-api-0.6.3 spec/fortnox/api/mappers/invoice_spec.rb
fortnox-api-0.6.2 spec/fortnox/api/mappers/invoice_spec.rb
fortnox-api-0.6.1 spec/fortnox/api/mappers/invoice_spec.rb
fortnox-api-0.6.0 spec/fortnox/api/mappers/invoice_spec.rb