Sha256: 7b6db280f04637d19db269aec302a2209a2c637fddac3581d54e17bc7049d820

Contents?: true

Size: 776 Bytes

Versions: 8

Compression:

Stored size: 776 Bytes

Contents

require 'spec_helper'

describe Moysklad::Entities::CustomerOrderPosition do
  context 'generate' do
    subject {
      p= Moysklad::Entities::CustomerOrderPosition.new 
      p.vat = 18
      p.basePrice = Moysklad::Entities::Price.new
      p.basePrice.sum = 123
      p.reserve = true
      p
    }

    it 'to_xml' do
      expect(subject.to_xml).to be_a String
    end

    it 'to_s' do
      expect(subject.to_s).to be_a String
    end

    it 'include xml' do
      expect(subject.to_xml).to include '<?xml version="1.0" encoding="utf-8"?>'
    end

    it 'include customerOrderPosition' do
      expect(subject.to_xml).to include "<customerOrderPosition"
    end

    it 'include basePrice' do
      expect(subject.to_xml).to include "<basePrice"
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
moysklad-0.3.0 spec/lib/moysklad/entities/customer_order_position_spec.rb
moysklad-0.2.1 spec/lib/moysklad/entities/customer_order_position_spec.rb
moysklad-0.2.0 spec/lib/moysklad/entities/customer_order_position_spec.rb
moysklad-0.1.5 spec/lib/moysklad/entities/customer_order_position_spec.rb
moysklad-0.1.4 spec/lib/moysklad/entities/customer_order_position_spec.rb
moysklad-0.1.3 spec/lib/moysklad/entities/customer_order_position_spec.rb
moysklad-0.1.2 spec/lib/moysklad/entities/customer_order_position_spec.rb
moysklad-0.1.1 spec/lib/moysklad/entities/customer_order_position_spec.rb