Sha256: b7f30b1a5b22ef8e7d183ebe4db81fc1d3267cef494ae33b15994c282eb1b2b6

Contents?: true

Size: 627 Bytes

Versions: 16

Compression:

Stored size: 627 Bytes

Contents

require 'spec_helper'

describe Moysklad::Entities::CustomerOrder do
  context 'generate' do
    subject {
      p= Moysklad::Entities::CustomerOrderPosition.new
      p.vat = 18
      p.price = Moysklad::Entities::Price.new
      p.price.value = 123
      p.reserve = 123

      co = Moysklad::Entities::CustomerOrder.new
      co.sum = Moysklad::Entities::Price.new
      co.sum.value = 456
      co.description = 'Описание'
      co.positions = [p]
      co
    }

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

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

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
moysklad-0.5 spec/lib/moysklad/entities/customer_order_spec.rb
moysklad-0.4.10 spec/lib/moysklad/entities/customer_order_spec.rb
moysklad-0.4.9 spec/lib/moysklad/entities/customer_order_spec.rb
moysklad-0.4.8 spec/lib/moysklad/entities/customer_order_spec.rb
moysklad-0.4.7 spec/lib/moysklad/entities/customer_order_spec.rb
moysklad-0.4.6 spec/lib/moysklad/entities/customer_order_spec.rb
moysklad-0.4.5 spec/lib/moysklad/entities/customer_order_spec.rb
moysklad-0.4.4 spec/lib/moysklad/entities/customer_order_spec.rb
moysklad-0.4.3 spec/lib/moysklad/entities/customer_order_spec.rb
moysklad-0.4.2 spec/lib/moysklad/entities/customer_order_spec.rb
moysklad-0.4.1 spec/lib/moysklad/entities/customer_order_spec.rb
moysklad-0.4.0 spec/lib/moysklad/entities/customer_order_spec.rb
moysklad-0.3.4 spec/lib/moysklad/entities/customer_order_spec.rb
moysklad-0.3.3 spec/lib/moysklad/entities/customer_order_spec.rb
moysklad-0.3.2 spec/lib/moysklad/entities/customer_order_spec.rb
moysklad-0.3.1 spec/lib/moysklad/entities/customer_order_spec.rb