Sha256: f43ded66fac4c3001ab4453d64fcb7ed0cd19f9323c684d2f92bde201840bbe8

Contents?: true

Size: 685 Bytes

Versions: 21

Compression:

Stored size: 685 Bytes

Contents

require "spec_helper"

describe PagSeguro::Transaction::Items do
  let(:xml) { MultiXml.parse(xml_file) }

  let(:items) do
    PagSeguro::Transaction::Items.new(xml['items'], '2')
  end

  subject { items }

  its(:items) { should be_a_kind_of(Array) }
  its(:count) { should eq('2') }

  let(:xml_file) {
    "<items>
      <item>
          <id>0001</id>
          <description>Notebook Prata</description>
          <quantity>1</quantity>
          <amount>24300.00</amount>
      </item>
      <item>
          <id>0002</id>
          <description>Notebook Rosa</description>
          <quantity>1</quantity>
          <amount>25600.00</amount>
      </item>
    </items>"
  }
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
pagseguro-transparente-1.1.0 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-1.0.1 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-1.0.0 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-0.2.5 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-0.2.4 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-0.2.3 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-0.2.2 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-0.2.1 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-0.2.0 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-0.1.3 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-0.1.2 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-0.1.1 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-0.1.0 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-0.0.9 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-0.0.8 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-0.0.7 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-0.0.6 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-0.0.5 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-0.0.4 spec/pagseguro/transaction/items_spec.rb
pagseguro-transparente-0.0.3 spec/pagseguro/transaction/items_spec.rb