Sha256: a9c472ab711c2ed8f08d45981989f9ba75655a99c6c7e26e65f5305f839c9120

Contents?: true

Size: 633 Bytes

Versions: 8

Compression:

Stored size: 633 Bytes

Contents

require_relative '../../test_helper'

module PagarMe
  class CardTest < PagarMeTestCase
    should 'be able to create' do
      card = PagarMe::Card.create card_params

      assert       card.id
      assert_equal card.first_digits, '490172'
      assert_equal card.last_digits,  '4448'
    end

    should 'be able to find by id' do
      card       = PagarMe::Card.create card_params
      found_card = PagarMe::Card.find_by_id card.id

      assert_equal card.id,           found_card.id
      assert_equal card.first_digits, found_card.first_digits
      assert_equal card.last_digits,  found_card.last_digits
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pagarme-2.4.0 test/pagarme/resources/card_test.rb
pagarme-2.3.0 test/pagarme/resources/card_test.rb
pagarme-2.2.3 test/pagarme/resources/card_test.rb
pagarme-2.2.2 test/pagarme/resources/card_test.rb
pagarme-2.2.1 test/pagarme/resources/card_test.rb
pagarme-2.2.0 test/pagarme/resources/card_test.rb
pagarme-2.1.4 test/pagarme/resources/card_test.rb
pagarme-2.1.3 test/pagarme/resources/card_test.rb