Sha256: 46613d6c8f9d33e2111c5367d0d15e1d89d59b3188524515574d1065141cfbcf

Contents?: true

Size: 720 Bytes

Versions: 6

Compression:

Stored size: 720 Bytes

Contents

require 'spec_helper'

describe Moysklad::Entities::CustomEntity do

  before do
    stub_rest :CustomEntityMetadata, :list, 0
    stub_rest :CustomEntity, :list, 0
  end

  let(:resource) { Moysklad::Resources::CustomEntities.indexed client: client }

  describe do
    let(:custom_entity) { resource.all.first }

    subject { custom_entity }

    it do
      expect(subject).to be_a Moysklad::Entities::CustomEntity
    end

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

    context 'entityMetadata' do

      it do
        expect(subject.entityMetadata(universe)).to be_a Moysklad::Entities::CustomEntityMetadata
      end

    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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