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