Sha256: 7f756e42490eaf463d04f0269452f67f5546426f5c08059011c3589dd7440c4d

Contents?: true

Size: 770 Bytes

Versions: 1

Compression:

Stored size: 770 Bytes

Contents

require 'spec_helper'

describe AmoCRM::Entities::CustomerOrderPosition do
  context 'generate' do
    subject {
      p= AmoCRM::Entities::CustomerOrderPosition.new 
      p.vat = 18
      p.basePrice = AmoCRM::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

1 entries across 1 versions & 1 rubygems

Version Path
amo_crm-0.2.2 spec/lib/amocrm/entities/customer_order_position_spec.rb