Sha256: ea1000ecad656b18500953f68fd2b30cd01d9f1ba40be69cdcedddc6bdba945c

Contents?: true

Size: 747 Bytes

Versions: 47

Compression:

Stored size: 747 Bytes

Contents

require 'spec_helper'

module Foo
  module Bar
    class Baz
      include NetSuite::Support::Fields
      include NetSuite::Support::Records

      def attributes
        { :source => 'Google', :total => 100.0 }
      end
    end
  end
end

describe NetSuite::Support::Records do
  let(:instance) { Foo::Bar::Baz.new }

  describe '#record_type' do
    it 'returns a hash of attributes to be used in a SOAP request' do
      instance.to_record.should eql({
        'platformCore:source' => 'Google',
        'platformCore:total'  => 100.0
      })
    end
  end

  describe '#record_type' do
    it 'returns a string of the record type to be used in a SOAP request' do
      instance.record_type.should eql('platformCore:Baz')
    end
  end

end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
netsuite-0.3.0 spec/netsuite/support/records_spec.rb
netsuite-0.2.6 spec/netsuite/support/records_spec.rb
netsuite-0.2.5 spec/netsuite/support/records_spec.rb
netsuite-0.2.4 spec/netsuite/support/records_spec.rb
netsuite-0.2.3 spec/netsuite/support/records_spec.rb
netsuite-0.2.2 spec/netsuite/support/records_spec.rb
netsuite-0.2.1 spec/netsuite/support/records_spec.rb
netsuite-0.2.0 spec/netsuite/support/records_spec.rb
netsuite-0.1.0 spec/netsuite/support/records_spec.rb
netsuite-0.0.50 spec/netsuite/support/records_spec.rb
netsuite-0.0.49 spec/netsuite/support/records_spec.rb
netsuite-0.0.48 spec/netsuite/support/records_spec.rb
netsuite-0.0.47 spec/netsuite/support/records_spec.rb
netsuite-0.0.45 spec/netsuite/support/records_spec.rb
netsuite-0.0.44 spec/netsuite/support/records_spec.rb
netsuite-0.0.43 spec/netsuite/support/records_spec.rb
netsuite-0.0.42 spec/netsuite/support/records_spec.rb
netsuite-0.0.41 spec/netsuite/support/records_spec.rb
netsuite-0.0.40 spec/netsuite/support/records_spec.rb
netsuite-0.0.39 spec/netsuite/support/records_spec.rb