Sha256: 1fa3c75697963d465346a0d5b13b599db213abfec1c6ffdd0ea8e246aa6e1974

Contents?: true

Size: 988 Bytes

Versions: 13

Compression:

Stored size: 988 Bytes

Contents

require "spec_helper"

describe NetSuite::Records::TransactionBodyCustomField do
  describe ".get" do
    context "success" do
      let(:internal_id) { 1 }
      let(:response) do
        NetSuite::Response.new(
          success: true,
          body: {
            access_level: "_edit",
            field_type: "_freeFormText",
            label: "Billing System Subdomain",
          }
        )
      end

      it "returns a TransactionColumnCustomField instance with populated fields" do
        expect(NetSuite::Actions::Get)
          .to receive(:call)
          .with([NetSuite::Records::TransactionBodyCustomField, internal_id: internal_id], {})
          .and_return(response)

        record = NetSuite::Records::TransactionBodyCustomField.get(internal_id: internal_id)

        expect(record.access_level).to eql("_edit")
        expect(record.field_type).to eql("_freeFormText")
        expect(record.label).to eql("Billing System Subdomain")
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

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