Sha256: 8057c25c9a5fe2de97601b2fc0eeaeb5611f6ca72f041ea2886f9089505703cd

Contents?: true

Size: 875 Bytes

Versions: 1

Compression:

Stored size: 875 Bytes

Contents

require_relative '../../test_helper'

module PagarMe
  class CustomerTest < PagarMeTestCase
    should 'be able to create' do
      customer = PagarMe::Customer.create external_id_customer_params[:customer]
      assert       customer.id
      assert_equal customer.name, 'Morpheus Fishburne'
      assert_equal customer.type, 'individual'
      assert_equal customer.external_id, "#3311"
      assert_equal customer.country, 'br'
      assert_equal customer.birthday, "1965-01-01"
      assert       customer.phone_numbers.any?
      assert_equal customer.phone_numbers, ["+5511999998888", "+5511888889999"]
    end

    should 'be able to find by id' do
      customer       = PagarMe::Customer.create external_id_customer_params[:customer]
      found_customer = PagarMe::Customer.find_by_id customer.id
      assert_equal customer.id, found_customer.id
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pagarme-2.4.0 test/pagarme/resources/customer_test.rb