Sha256: 3ee96e791baef1c8e40b3831b948741b0b85bd6bdda892e2002e16223c8749a8

Contents?: true

Size: 916 Bytes

Versions: 6

Compression:

Stored size: 916 Bytes

Contents

require 'spec_helper'

describe NetSuite::Records::TranslationList do
  let(:list) { NetSuite::Records::TranslationList.new }

  it 'has a translations attribute' do
    expect(list.translations).to be_kind_of(Array)
  end

  describe '#to_record' do
    before do
      list.translations << NetSuite::Records::Translation.new(
        locale: '_englishUK',
        language: 'English (UK)',
        display_name: 'display name',
        sales_description: 'sales description'
      )
    end

    it 'can represent itself as a SOAP record' do
      record = {
        "listAcct:translation" => [
          {
            "listAcct:locale" => "_englishUK",
            "listAcct:language" => "English (UK)",
            "listAcct:displayName" => "display name",
            "listAcct:salesDescription" => "sales description"
          }
        ]
      }
      expect(list.to_record).to eql(record)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
netsuite-0.9.3 spec/netsuite/records/translation_list_spec.rb
netsuite-0.9.2 spec/netsuite/records/translation_list_spec.rb
netsuite-0.9.1 spec/netsuite/records/translation_list_spec.rb
netsuite-0.9.0 spec/netsuite/records/translation_list_spec.rb
netsuite-0.8.12 spec/netsuite/records/translation_list_spec.rb
netsuite-0.8.11 spec/netsuite/records/translation_list_spec.rb