Sha256: bda605d0c20bc07d2aea222108025f226f2c5bc11c1db69794c50ac1f4611698
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
require 'spec_helper' describe AmoCRM::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) { AmoCRM::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 AmoCRM::Entities::Good end describe 'аттрибут типа ID_CUSTOM' do subject { attribute_with_id_custom } it do expect(subject.metadata(universe)).to be_a AmoCRM::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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
amo_crm-0.2.2 | spec/lib/amocrm/entities/attribute_spec.rb |