Sha256: b6d2d9bfb198a9e4760b738437886444ce3448683ae05b3ccfff8c539c3de2e9

Contents?: true

Size: 665 Bytes

Versions: 53

Compression:

Stored size: 665 Bytes

Contents

require 'spec_helper'
require 'ostruct'

module NetSuite
  module Records
    describe MatrixOptionList do
      it "deals with hash properly" do
        hash = {:value=>{:@internal_id=>"1", :@type_id=>"36"}}

        list = described_class.new({ matrix_option: hash })
        expect(list.options.first.value_id).to eq "1"
      end

      it "deals with arrays properly" do
        array = [
          {:value=>{:@internal_id=>"2", :@type_id=>"28"}},
          {:value=>{:@internal_id=>"1", :@type_id=>"29"}}
        ]

        list = described_class.new({ matrix_option: array })
        expect(list.options.first.value_id).to eq "2"
      end
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
netsuite-0.8.4 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.8.3 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.8.2 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.8.1 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.8.0 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.7.9 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.7.8 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.7.7 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.7.6 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.7.5 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.7.4 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.7.3 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.7.2 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.7.1 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.7.0 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.6.9 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.6.8 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.6.7 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.6.6 spec/netsuite/records/matrix_option_list_spec.rb
netsuite-0.6.5 spec/netsuite/records/matrix_option_list_spec.rb