Sha256: 334f55c95bc1f5608d3c74c85492f7c38eb7f927d51c6af4d4b02e5cb81e066b

Contents?: true

Size: 711 Bytes

Versions: 13

Compression:

Stored size: 711 Bytes

Contents

require 'spec_helper'

describe NetSuite::Records::PricingMatrix do
  describe "#initialize" do
    it "behaves appropriately if it gets a hash as attributes[:pricing]" do
      # this is what savon returns if there is only one pricing strategy matrix
      # for the item:
      matrix = [
        {
          currency: { internal_id: 1 },
          price_level: { internal_id: 1 },
          price_list: {
            price: [
              {
                value: 25.0,
                quantity: 0
              }
            ]
          }
        }
      ]

      subject = described_class.new({pricing: matrix})
      expect(subject.pricing[0]).to be_kind_of(NetSuite::Records::Pricing)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
netsuite-0.9.3 spec/netsuite/records/pricing_matrix_spec.rb
netsuite-0.9.2 spec/netsuite/records/pricing_matrix_spec.rb
netsuite-0.9.1 spec/netsuite/records/pricing_matrix_spec.rb
netsuite-0.9.0 spec/netsuite/records/pricing_matrix_spec.rb
netsuite-0.8.12 spec/netsuite/records/pricing_matrix_spec.rb
netsuite-0.8.11 spec/netsuite/records/pricing_matrix_spec.rb
netsuite-0.8.10 spec/netsuite/records/pricing_matrix_spec.rb
netsuite-0.8.9 spec/netsuite/records/pricing_matrix_spec.rb
netsuite-0.8.8 spec/netsuite/records/pricing_matrix_spec.rb
netsuite-0.8.7 spec/netsuite/records/pricing_matrix_spec.rb
netsuite-0.8.6 spec/netsuite/records/pricing_matrix_spec.rb
netsuite-0.8.5 spec/netsuite/records/pricing_matrix_spec.rb
netsuite-0.8.4 spec/netsuite/records/pricing_matrix_spec.rb