Sha256: 6c654f5709f69bcbc6b7e34daa3436e9fd4d528f3c347c82ea93f8b30e1e8489
Contents?: true
Size: 1.03 KB
Versions: 3
Compression:
Stored size: 1.03 KB
Contents
require 'spec_helper' describe Moysklad::Entities::Attribute do let(:good_uuid) { 'eb77ad57-2e22-11e4-4030-002590a28eca' } before do stub_rest :Good, good_uuid stub_rest :EmbeddedEntityMetadata, :list, 0 stub_rest :CustomEntity, :list, 0 end let(:goods_resource) { Moysklad::Resources::Goods.indexed client: client } let(:good) { goods_resource.get good_uuid } let(:attribute_with_id_custom) { good.attributes.first } let(:attribute_with_text) { good.attributes.second } it 'should get ' do expect(good).to be_a Moysklad::Entities::Good end describe 'аттрибут типа ID_CUSTOM' do subject { attribute_with_id_custom } it do expect(subject.metadata(universe)).to be_a Moysklad::Entities::AttributeMetadata expect(subject.metadata(universe).name).to eq 'Вставки' expect(subject.attributeName(universe)).to eq 'Вставки' end it do expect(subject.get_value(universe)).to eq "Культ. жемчуг, куб. циркон" end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
moysklad-0.3.0 | spec/lib/moysklad/entities/attribute_spec.rb |
moysklad-0.2.1 | spec/lib/moysklad/entities/attribute_spec.rb |
moysklad-0.2.0 | spec/lib/moysklad/entities/attribute_spec.rb |