Sha256: 27da44a3552fc4ff9396b1cf8ae13beb2efe3021da897057ea0532f3cdb44d92
Contents?: true
Size: 929 Bytes
Versions: 2
Compression:
Stored size: 929 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Imis::Panel::Vsc do let(:vsc) { described_class.new } let(:details) do { certificate: 'E136924', year: 2024, count: 42 } end before { vsc.api.imis_id = 6374 } describe '#get' do it 'loads a specific object' do expect(vsc.get(1433)).to be_a(Hash) end end # rubocop:disable RSpec/ExampleLength it 'handles new records correctly', :aggregate_failures do new_record = vsc.create(details) expect(new_record).to be_a(Hash) ordinal = new_record['Properties']['$values'][1]['Value']['$value'] update_result = vsc.update(details.merge(count: 43, ordinal: ordinal)) updated = update_result['Properties']['$values'].find { |v| v['Name'] == 'Quantity' } expect(updated['Value']['$value']).to eq(43) expect(vsc.destroy(ordinal)).to eq('') end # rubocop:enable RSpec/ExampleLength end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
usps-imis-api-0.2.1 | spec/lib/imis/panel/vsc_spec.rb |
usps-imis-api-0.2.0 | spec/lib/imis/panel/vsc_spec.rb |